rpm -qf on a directory with the trailing / returns an error. This is wrong behavior but not crippling: [root@localhost mail]# rpm -qf /var/spool/mail/ *** db3 dbcursor->c_get rc -1 Invalid argument error getting "" records from Basenames index file /var/spool/mail/ is not owned by any package [root@localhost mail]# rpm -qf /var/spool/mail filesystem-2.0.2-1 [root@localhost mail]# Solution -- if there is a training / chop it off a 'filename' before running the query.
Fixed in rpm-4.0-0.47. BTW, the following will now work as well cd /bin rpm -qf . Thanks for the report.
*** Bug 9668 has been marked as a duplicate of this bug. ***