Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 14961 - RPM -qf requires full path
RPM -qf requires full path
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  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:
Last Closed: 2000-09-14 13:19:12 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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
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.