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
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.