Bug 87603 - RFE: more sane error handling
Summary: RFE: more sane error handling
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-03-30 13:30 UTC by Gerald Teschl
Modified: 2007-04-18 16:52 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-04-03 00:14:00 UTC


Attachments (Terms of Use)

Description Gerald Teschl 2003-03-30 13:30:21 UTC
I just happened to type rpm -e foo as normal user with
the following result:

1) first there was a 10 sec pause
2) then numerous db4 errors would scroll by for
another 10 secs

Why doesn't it just say

permission denied 

and stops!? Moreover, many of the error messages contain
no printable characters.

Comment 1 Jeff Johnson 2003-03-31 14:22:06 UTC
Here's what I see, rpm-4.1.1 and later:
    bash$ rpm -e
    rpm: no packages given for erase
    bash$ rpm -e foo
    error: package foo is not installed
Looks sane to me.


Comment 2 Gerald Teschl 2003-03-31 17:38:58 UTC
I say try to erase a package which is installed as a non privelidged user
(who does not have rw access to the database).

Comment 3 Jeff Johnson 2003-04-03 00:14:00 UTC
This too does not seem excessively insane:

bash$ rpm -e time
error: cannot get exclusive lock on /var/lib/rpm/Packages
error: cannot open Packages index using db3 - Operation not permitted (1)
error: cannot open Packages database in /var/lib/rpm

There are actually 3 different API layers, each with different info.

Comment 4 Gerald Teschl 2003-04-03 08:37:58 UTC
This is what I get

[gerald@soliton gerald]$ rpm -q rpm
rpm-4.2-0.69
[gerald@soliton gerald]$ rpm -e nedit
rpmdb: c_del: attempt to modify a read-only tree
error: db4 error(13) from dbcursor->c_del: Permission denied
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "nedit" from Name
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "nc" from Basenames
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "nedit" from Basenames
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "nc.1x.gz" from Basenames
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "nedit.1x.gz" from Basenames
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "net-nedit.desktop" from Basenames
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "nedit-5.3" from Basenames
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "README" into Basenames
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "ReleaseNotes" into Basenames
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "nedit.doc" from Basenames
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "Applications/Editors" into Group
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "/usr/bin/desktop-file-install" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "libICE.so.6" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "libSM.so.6" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "libX11.so.6" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "libXext.so.6" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "libXm.so.3" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "libXmu.so.6" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "libXp.so.6" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "libXpm.so.4" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "libXt.so.6" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "libc.so.6" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "libc.so.6(GLIBC_2.0)" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "libc.so.6(GLIBC_2.1)" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "libc.so.6(GLIBC_2.1.3)" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "libc.so.6(GLIBC_2.3)" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "libm.so.6" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "libm.so.6(GLIBC_2.0)" into Requirename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "openmotif" into Requirename
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "nedit" from Providename
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "/usr/X11R6/bin/" into Dirnames
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "/usr/X11R6/man/man1/" into Dirnames
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "/usr/share/applications/" into Dirnames
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "/usr/share/doc/" into Dirnames
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "/usr/share/doc/nedit-5.3/" from Dirnames
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "3.0.4-1" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "4.0-1" into Requireversion
error: db4 error(13) from dbcursor->c_put: Permission denied
error: error(13) storing record "5.3-4" into Provideversion
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "ÃJ>¡" from Installtid
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "¡cci|÷òíÃìZ3{
|8434b508eb3421444a0f40bcbb010e61531889a4" from Sigmd5
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "8434b508eb3421444a0f40bcbb010e61531889a4" from
Sha1header
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "®ù%Ã"þ6Ã7(¦`" from Filemd5s
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "=ÃI¢Ã]÷Eæo" from Filemd5s
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "-Lô" from Filemd5s
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "º5Ã}â9B|±é#ÃÃ" from Filemd5s
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "Ãb®5)úåçaïÃÃ" from Filemd5s
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "Ã/¿8ÃëUcÃ4SõðÃ" from Filemd5s
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "Ãó"úëiXL;ÃBC
Ã" from Filemd5s
error: db4 error(13) from dbcursor->c_del: Permission denied
error: error(13) removing record "¤[õý¯½5g¹IWý" from Filemd5s
error: db4 error(13) from db->close: Permission denied
error: db4 error(13) from db->close: Permission denied
error: db4 error(13) from db->close: Permission denied
error: db4 error(13) from db->close: Permission denied


Comment 5 Gerald Teschl 2003-04-03 08:43:02 UTC
Ok. So now I am confused. I just tried this on a freshly installed box
and I get the same result as you!? The only difference is that the
above box was upgraded from 8.0.94, whereas the working box has a
fresh install from scratch.



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