Bug 16860 - rpm utility upgrade breaks the packages database
Summary: rpm utility upgrade breaks the packages database
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 6.2
Hardware: sparc
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-08-24 13:01 UTC by franck.lemonnier
Modified: 2008-05-01 15:37 UTC (History)
0 users

Clone Of:
Last Closed: 2000-08-24 13:15:20 UTC

Attachments (Terms of Use)

Description franck.lemonnier 2000-08-24 13:01:06 UTC

Following your advices, I've tried to upgrade the rpm utility with the 
following components :

- rpm-4.0-0.67.6x
- rpm-build-4.0-0.67.6x
- rpm-devel-4.0-0.67.6x
- rpm-python-4.0-0.67.6x
- popt-1.6-0.67.6x

For doing this, I use "rpm -Fvh popt-1.6-0.67.6x" first and "rpm -Fvh rpm-
4.0-0.67.6x rpm-build-4.0-0.67.6x rpm-devel-4.0-0.67.6x rpm-python-4.0-
0.67.6x" after.

All seems ok but when I try "rpm -qa", nothing appears.
So, I make a "rpm --rebuilddb" to reconstruct the db but nothing happens.
I go in the /var/lib/rpm directory and all seems te be here (I have an 8 
Mb 'packages.rpm' file).

rpm doesn't see any packages in my system.

What can I do ?

Best regards.

Comment 1 Jeff Johnson 2000-08-24 13:15:18 UTC
Rpm will be confused if there are two databases on your system. Please check for
If both exist, you have 2 databases.

The larger of the 2 is probably the on you want. You say that packages.rpm is
8Mb, instructions
below are specific to preserving packages.rpm.

0) Save your database "just in case"
	cd /var/lib/
	tar czvf rpmdb-save.tar.gz rpm
You probably also want to save the list of packages that were installed in the
db3 database
by doing
	rpm -qa >& /tmp/packages_to_reinstall

1) Remove /var/lib/rpmPackages.
	rm /var/lib/rpm/Packages

2) Rebuild the database
	rpm --rebuilddb

3) Verify success by checking
	a) /var/lib/rpm/packages.rpm (and all of /var/lib/rpm/*.rpm) are gone.
	b) /var/lib/rpm/Packages (and other files starting with capital letters) exist.
	should be approcimately the same size as the original packages.rpm ~8Mb.
	c) Check that information can be retrieved
		rpm -qa
		rpm -q --whatrequires libc.so.6
	You may wish to try other checks.

4) Reinstall the packages listed in /tmp/packages_to_reinstall.

If you found *.rpm files in /var/lib/rpm in 3a) above, you should remove them

Comment 2 Jeff Johnson 2000-09-14 16:28:54 UTC
This problem appears resolved. Please reopen if not.

Note You need to log in before you can comment on or make changes to this bug.