Red Hat Bugzilla – Bug 18770
non root running of rpm is overly unhelpful
Last modified: 2007-04-18 12:29:08 EDT
A frequent mistake I make, and have seen many others make, is to run rpm as
a non root user when doing installs. Previously the error message was a
unhelp "unable to open rpm database". Now the error message is a long
discourse about the possible need to upgrade my rpm database.
It would be nice if RPM did a simple check to see if the user was not uid 0
and prior to giving database migration instructions simply suggested I
become root first.
I'm willing to provide a patch if this would accelerated getting this
FWIW, the "long discourse" is all that prevents disaster when upgrading from
rpm-3.0.x to rpm-4.0.
If you want to attempt a patch, see dbiOpen() in lib/rpmdb.c. I'll be happy to
but, I warn you ahead of time, the change is much trickier than it looks. Please
bug if you succeed with a patch. Meanwhile, since the "long discourse" is
not otherwise harmful, I'm gonna close this report.