Red Hat Bugzilla – Bug 53548
rpm --queryformat hangs
Last modified: 2008-05-01 11:38:00 EDT
Description of Problem:
Not sure if this is the same as eg. #50992 - but as that bug was fixed in rpm-4.0.3-0.87 this should be different:
When doing rpm queries, rpm hangs. You have to stop it and remove
/var/lib/rpm/__db* , then everything works fine again.
There doesn't seem to be an obvious reason why something breaks.
Eg. I did a rpm -qa --querytags .... Worked fine. I played around
a bit to include all the tags needed, and suddenly rpm stopped
I also experienced cases where rpm -qa still worked, but
rpm -qa --querytags didn't.
Version-Release number of selected component (if applicable):
Hm, I think that's just playing around and waiting until it breaks ... nothing more specific ... :(
rpm should not hang ... :)
Yup, if you dink around enough, particularly if you
use ^C a lot, you will find yourself with an
invalid cache (i.e. the /var/lib/rpm/__db* files).
The answer for rpm-4.0.3 is basically
Don't do that.
and, if you ignore that message, then do
rm -f /var/lib/rpm/__db*
when the problem reoccurs.
Yes, rpm-4.0.3 removes those files when starting,
but that doesn't work if, say, you've ^C'd out
of a root install, and are running an rpm query
w/o root privileges.
The solution is going to be to make rpm setgid
rpm, but there's more release engineering needed
in order to achieve this.