Public bug reported:

Binary package hint: rpm

Description:    Ubuntu 9.10
Release:        9.10

rpm:
  Installed: 4.7.0-9
  Candidate: 4.7.0-9
  Version table:
 *** 4.7.0-9 0
        500 http://gb.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

Upgrading from jaunty to karmic (on amd64, as it happens) broke my RPM
database and left me with a cryptic debconf "question" and no option to
halt the upgrade or otherwise take steps to rectify the situation.

"Database which rpm keeps about installed packages is not usable with
new version. The old database has been stored in /var/backups, you will
have to recover it if you have used it for something. See README.Debian
for details."

Whether or not people _should_ be using alien instead of rpm is
irrelevant; people _do_ use rpm directly. To break an existing install
is not good enough. The average user will, I guess, ignore the cryptic
debconf message and forget about it. Some time later - next time they
try to do anything involving rpm - they will find they have an empty rpm
database which no longer corresponds to the installed state of the
system. They, rpm, and whoever provided them with that rpm package will
undoubtedly get very confused.

It seems possible to automatically migrate the database, so why
shouldn't postinst at least try? Adding a dependency on db4.6_utils will
not exactly break the bank.

Here are some steps to manually fix your RPM database (which worked for me, 
having had a local RPM database since intrepid):
1. sudo apt-get install db4.6_utils
2. Unpack /var/backups/rpm-<TIMESTAMP>.tar.gz. This is probably best done with 
"sudo tar zxf -C / foo.tar.gz".
3. cd /var/lib/rpm && sudo db4.6_recover
4. sudo rpm --rebuilddb
5. rpm -qa and verify that the list of installed RPMs is what you expected.

Oh, and by the way, the README.Debian is wrong, referring to
/var/lib/backup/rpm-<TIMESTAMP>.tar.gz whereas it actually puts the
backup in /var/backups/rpm-<TIMESTAMP>.tar.gz .

** Affects: rpm (Ubuntu)
     Importance: Undecided
         Status: New

-- 
Upgrade to karmic should not migrate, not break, existing RPM database
https://bugs.launchpad.net/bugs/485787
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to