Bug 21127 - RPM error message possibly damagingly misleading
RPM error message possibly damagingly misleading
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-11-20 10:53 EST by Mike A. Harris
Modified: 2008-05-01 11:37 EDT (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description Mike A. Harris 2000-11-20 10:53:43 EST
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 11:10:16 EST
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 12:15:27 EST
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.