Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 21127

Summary: RPM error message possibly damagingly misleading
Product: [Retired] Red Hat Linux Reporter: Mike A. Harris <mharris>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-11-20 15:53:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mike A. Harris 2000-11-20 15:53:43 UTC
The following error message is very misleading, and potentially could
be very damaging to an inexperienced user.  If an ordinary user tries
to remove an rpm package from the command line with 'rpm -e', the
following errr is displayed:

[mharris@asdf download]$ rpm -e ed
cannot open Packages index using db3 - Permission denied (13)

--> The rpm database cannot be opened in db3 format.
    If you have just upgraded the rpm package you need to convert
    your database to db3 format by running "rpm --rebuilddb" as root.

error: cannot open /var/lib/rpm/packages.rpm


It is easy at this point for a user to misconstrue the message and
attempt to convert his rpm database with db3 somehow.  At the very
least, the message displayed should say something to the effect of:

rpm:  error: You must be root to uninstall packages from the system

After all, That is the reason rpm can not proceed after all.  db3
does not enter into the equation this time, so no error mentioning
it should occur.  I've seen several people on different lists
completely baffled because of this, and I just got hit by it so
I thought I'd bugzilla it.

Comment 1 Jeff Johnson 2000-11-20 16:10:16 UTC
All information in the error message printed is factually correct (although
possibly redundant,
misleading, verbose and/or chatty).

The text is often the only clue for people who have blindly upgraded to the
latest version
of rpm without any understanding of what they have done. Even if the user
"misconstrues"
the message, a database rebuild will not hurt a bit.

Filtering the message requires a deep understanding of all possible return codes
from
db1 and db3, for now and for the future, for all possible modes of execution
(e.g. rebuilddb is
necessarily different) of rpm. 

FWIW the error message that you desire
	rpm:  error: You must be root to uninstall packages from the system
is simply wrong, as the access policy for the rpm database is determined
by permissions on directories/files outside of rpm, not by rpm itself.


Comment 2 Mike A. Harris 2000-11-20 17:15:27 UTC
While I agree with you 100%, I was looking at it from an end user's
perspective.  It is confusing in this context.  I realize the reason
for the message from a technical perspective, however if it could be
changed in some way with better logic for end users it would be nice.
I should have labelled it "enhancement" instead.. oops.  ;o)