Bug 21127 - RPM error message possibly damagingly misleading
Summary: RPM error message possibly damagingly misleading
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm   
(Show other bugs)
Version: 7.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2000-11-20 15:53 UTC by Mike A. Harris
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-11-20 15:53:45 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

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
the message, a database rebuild will not hurt a bit.

Filtering the message requires a deep understanding of all possible return codes
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)

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