Red Hat Bugzilla – Bug 14961
RPM -qf requires full path
Last modified: 2008-05-01 11:37:57 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
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.
Created attachment 2117 [details]
don't remove leading ./ in rpmCleanPath
There are almost certainly "other problems". Deferred.
Time to find out what other problems there are. Applied in rpm-4.1 cvs, thanks
for the patchl.