emerge gentoolkil -p [ebuild R ] app-portage/gentoolkit-0.2.4_rc5 equery belongs $(readlink /usr/lib/libGL.so) returns: nothing readlink /usr/lib/libGL.so returns: //usr/lib64/opengl/nvidia/lib/libGL.so equery belongs //usr/lib64/opengl/nvidia/lib/libGL.so returns: nothing equery belongs /usr/lib64/opengl/nvidia/lib/libGL.so returns: [ Searching for file(s) /usr/lib64/opengl/nvidia/lib/libGL.so in *... ] x11-drivers/nvidia-drivers-177.13 (/usr/lib64/opengl/nvidia/lib/libGL.so -> libGL.so.177.13) Obviously this is returning nvidia since an nvidia-based system (just an example) Looking over /usr/bin/equery there is some python-foo to take care of trailing "/" but nothing for leading double "/" Also added a an extra check just incase no leading '/' is provided 373a374,378 > leading_slash = query[i].split('/').count('') - 1 > if leading_slash < 0: > leading_slash = 0 > query[i] = query[i][leading_slash:] > Reproducible: Always
Created attachment 162801 [details] edited equery with leading "/" check on belongs
Actually: query[i] = '/' + query[i].lstrip('/') is probably simpler be it overkill with the lstrip for 99% of the time 373a374 > query[i] = '/' + query[i].lstrip('/')
Created attachment 162803 [details] updated equery file
Created attachment 162806 [details, diff] Patchfile for equery Sorry here is a patch file, not the whole src
Thanks, I changed it to be more generic and it now strips multiple slashes found anywhere in the path name. $ svn commit -m " Fix equery belongs to strip multiple slashes from path names. (Bug #234584)" ChangeLog src/equery/equery Sending ChangeLog Sending src/equery/equery Transmitting file data .. Committed revision 505.
Released in gentoolkit-0.2.4_rc6