Bug 12493

Summary: rpm -qf 'nit' on directories
Product: [Retired] Red Hat Linux Reporter: R P Herrold <herrold>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-06-19 00:46:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description R P Herrold 2000-06-19 00:46:44 UTC
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.

Comment 1 Jeff Johnson 2000-07-10 18:22:34 UTC
Fixed in rpm-4.0-0.47. BTW, the following will now work as well

	cd /bin
	rpm -qf .

Thanks for the report.

Comment 2 Jeff Johnson 2000-07-21 13:56:21 UTC
*** Bug 9668 has been marked as a duplicate of this bug. ***