It appears that the error message logic is not checking for the existence of /var/lib/rpm/Packages (etc) before incorrectly suggesting a useless rebuilddb -- -- It would seem that RPM knows its own version (4), thjat it therefore knows that it is using db3 format, and that when the get lock fails, it can determine omit this message ... ======================================================= [root@couch herrold]# rpm -e slrn cannot get exclusive lock on /var/lib/rpm/Packages cannot open Packages index using db3 - Operation not permitted (1) --> 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 [root@couch herrold]# ls -al /var/lib/rpm total 11279 drwxr-xr-x 2 root root 1024 Feb 14 1996 . drwxr-xr-x 12 root root 1024 Oct 27 20:19 .. -rw-r--r-- 1 root root 2625536 Nov 12 13:02 Basenames -rw-r--r-- 1 root root 12288 Nov 12 13:02 Conflictname -rw-r--r-- 1 root root 12288 Nov 12 13:02 Group -rw-r--r-- 1 root root 24576 Nov 12 13:02 Name -rw-r--r-- 1 root root 9076736 Nov 12 13:02 Packages -rw-r--r-- 1 root root 86016 Nov 12 13:02 Providename -rw-r--r-- 1 root root 114688 Nov 12 13:02 Requirename -rw-r--r-- 1 root root 12288 Oct 27 20:24 Triggername [root@couch herrold]# rpm -q rpm rpm-4.0-4 [root@couch herrold]#
FWIW, there's nothing "false" about any of the text in the error message. While the message is overly chatty and verbose, there is a need to suggest that new users convert from db1 -> db3 that is far more important than attempting to identify all possible error returns in order to provide terser error messages.