package should handle empty dbfile better
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dbconfig-common (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I performed a `do-release-
Some excerpts from `/var/log/
```
Unpacking dbconfig-common (2.0.9) over (2.0.4ubuntu1) ...
```
```
creating database backup in /var/cache/
applying upgrade sql for 1.2~beta+
error encountered processing /usr/share/
mysql said: ERROR 1060 (42S21) at line 2: Duplicate column name 'failed_login'
An error occurred while upgrading the database:
mysql said: ERROR 1060 (42S21) at line 2: Duplicate column name 'failed_login'
```
```
dbconfig-common: writing config to /etc/dbconfig-
applying upgrade sql for 1.3.6+dfsg.1-1 -> 1.4.1-1.
error encountered processing /usr/share/
mysql said: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/
ESC[?1049hESC[
```
Here's what I saw on my screen:
```
Package configuration
┌────
│ │
│ An error occurred while upgrading the database:
│
│ mysql said: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/
│
│ Fortunately, should hold a backup of the database, made just before the upgrade (unless the error occurred during backup creation, in which case no changes will have been
│ applied yet). Your options are:
│ * abort - Causes the operation to fail; you will need to downgrade,
│ reinstall, reconfigure this package, or otherwise manually intervene
│ to continue using it. This will usually also impact your ability to
│ install other packages until the installation failure is resolved.
│ * retry - Prompts once more with all the configuration questions
│ (including ones you may have missed due to the debconf priority
│ setting) and makes another attempt at performing the operation.
│ * retry (skip questions) - Immediately attempts the operation again,
│ skipping all questions. This is normally useful only if you have
│
│ <Ok>
│ │
└────
```
the relevant text is:
```
Fortunately, ${dbfile} should hold a backup of the database, made just before
```
Whatever part of `dbconfig-common` is responsible for displaying this text should confirm it has a `${dbfile}` before it goes off and displays this text (or perhaps before it goes down the path that leads to displaying this text).
My current version is:
dbconfig-common 2.0.22~pgdg18.04+1
```
# lsb_release -rd
Description: Ubuntu 20.04.5 LTS
Release: 20.04
```
```
# apt-cache policy dbconfig-common
dbconfig-common:
Installed: 2.0.22~pgdg18.04+1
Candidate: 2.0.22~pgdg18.04+1
Version table:
*** 2.0.22~pgdg18.04+1 100
100 /var/lib/
2.0.13 500
500 http://
```
(But note that this may not have been the current version at the time of the instance... it's a bit hard for me to tell from the logs I have. That said, I doubt that the code has significantly changed.)
Expected results
1. Ensure strings that should have values have values before using them
2. Include quotes around such strings (even seeing ` "" ` is better than seeing ` ` as it hints that there's a problem)
Actual results
```
Fortunately, should hold a backup of the database, made just before the upgrade (unless the error occurred during backup creation, in which case no changes will have been
applied yet). Your options are:
```
Weird, launchpad ate the tell-tale double spaces!
"Fortunately, should hold a backup of the database"
originally looked like:
"Fortunately, should hold a backup of the database"
(two spaces after ","). timeless shared the pastebins with me while fighting this.