Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 215646 - app-arch/rpm-4.4.6-r4 failed rebuilding database /var/lib/rpm/Packages
Summary: app-arch/rpm-4.4.6-r4 failed rebuilding database /var/lib/rpm/Packages
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-31 21:22 UTC by Martin von Gagern
Modified: 2010-04-22 18:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2008-03-31 21:22:59 UTC
# emerge -1 =rpm-4.4.6-r4
...
>>> Original instance of package unmerged safely.
 * RPM database found... Rebuilding database (may take a while)...
rpmdb: /var/lib/rpm/Packages: unexpected file type or format
error: cannot open Packages index using db3 - Invalid argument (22)
 * Byte compiling python modules for python-2.5 .. ...                                                                                                 [ ok ]
...
# file /var/lib/rpm/Packages
/var/lib/rpm/Packages: Berkeley DB (Btree, version 9, native byte-order)

I've noticed this error message quite by accident, as I had to remerge rpm due to an update of neon. Examining logs from previous runs, I can tell this happened before. Looks like I had rpm-5.0_beta4 installed before it got masked due to bug 205280, and this error happened ever since. So it might be the format created by rpm-5 is incompatible with rpm-4. However, I'd expect an ewarn in this case, so I know about the problem.

Personally, I have no rpm-managed packages installed, so I can simply delete the database and run rpm --initdb. However, I could imagine that the consequences might be more severe for other users. I have no clue how much the formats differ, if there is any chance to convert the format, or if you should suggest users to unmask rpm-5 if they have any rpm packages installed.
Comment 1 Stanislav Ochotnicky (RETIRED) gentoo-dev 2010-04-22 18:54:07 UTC
rpm-4* and rpm-5* are nowadays completely different packages (as far as their source code goes). As such database format is not compatible (which you correctly guessed). 

I am closing this bug as INVALID because rpm-4 and rpm-5 are really not compatible and rpm-5* is hard-masked in portage. Therefore to trigger this bug you would have unmask the package yourself. Breakages are to be expected then.

If you feel this is incorrect, feel free to re-open the bug.