Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 14961

Summary: RPM -qf requires full path
Product: [Retired] Red Hat Linux Reporter: Cole Tuininga <egon>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: katzj
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-09-14 17:19:12 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:
Attachments:
Description Flags
don't remove leading ./ in rpmCleanPath none

Description Cole Tuininga 2000-08-01 14:00:03 UTC
Performing an rpm -qf on a file will not work with relative paths:

[root@(removed) etc]# rpm -qf ./rc.d/init.d/lpd
file /rc.d/init.d/lpd: No such file or directory
[root@(removed) etc]# cd rc.d/init.d
[root@(removed) init.d]# rpm -qf ./lpd
file /lpd: No such file or directory
[root@(removed) init.d]# rpm -qf `pwd`/lpd
LPRng-3.6.21-8

Comment 1 Jeremy Katz 2000-08-05 20:36:42 UTC
This is because rpmCleanPath is, in my opinion, a little overzealous about
stripping the path to files.  The attached patch will solve this problem, but
I'm not sure what other problems are caused by leaving a leading ./ on the files
opened by rpm.

Comment 2 Jeremy Katz 2000-08-05 20:37:49 UTC
Created attachment 2117 [details]
don't remove leading ./ in rpmCleanPath

Comment 3 Jeff Johnson 2000-08-06 23:25:51 UTC
There are almost certainly "other problems". Deferred.

Comment 4 Jeff Johnson 2000-09-16 14:04:57 UTC
Time to find out what other problems there are. Applied in rpm-4.1 cvs, thanks
for the patchl.