Bug 14961 - RPM -qf requires full path
RPM -qf requires full path
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-08-01 10:00 EDT by Cole Tuininga
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-09-14 13:19:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
don't remove leading ./ in rpmCleanPath (743 bytes, patch)
2000-08-05 16:37 EDT, Jeremy Katz
no flags Details | Diff

  None (edit)
Description Cole Tuininga 2000-08-01 10:00:03 EDT
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 16:36:42 EDT
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 16:37:49 EDT
Created attachment 2117 [details]
don't remove leading ./ in rpmCleanPath
Comment 3 Jeff Johnson 2000-08-06 19:25:51 EDT
There are almost certainly "other problems". Deferred.
Comment 4 Jeff Johnson 2000-09-16 10:04:57 EDT
Time to find out what other problems there are. Applied in rpm-4.1 cvs, thanks
for the patchl.

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