Hello. Upon eselect-openg-1.3.1-r2 merge the following output is produced by portage: >>> Installing (1 of 1) app-admin/eselect-opengl-1.3.1-r2::gentoo * checking 1 files for package collisions >>> Merging app-admin/eselect-opengl-1.3.1-r2 to / --- /usr/ --- /usr/share/ --- /usr/share/eselect/ --- /usr/share/eselect/modules/ >>> /usr/share/eselect/modules/opengl.eselect >>> Safely unmerging already-installed instance... No package files given... Grabbing a set. --- replaced obj /usr/share/eselect/modules/opengl.eselect --- replaced dir /usr/share/eselect/modules --- replaced dir /usr/share/eselect --- replaced dir /usr/share --- replaced dir /usr >>> Regenerating /etc/ld.so.cache... >>> Original instance of package unmerged safely. find: `//usr/lib*/opengl': No such file or directory find: `//usr/lib*/opengl': No such file or directory Switching to xorg-x11 OpenGL interface... done >>> app-admin/eselect-opengl-1.3.1-r2 merged. Note those "find: `//usr/lib*/opengl': No such file or directory" messages. Please fix. Reproducible: Always
Why is this a problem?
(In reply to Jeroen Roovers from comment #1) > Why is this a problem? Because this is an error message from `find`. It shouldn't be in the portage output.
It's because the glob doesn't expand if the directory doesn't exist. But even if it does this is going to give you an error. If /usr/lib is a symlink to /usr/lib64 find will end up passing two paths to rmdir, and obviously the second will fail. I don't think -xtype is portable. I can't remember if we require gnu find. Something like this should work: find /usr/lib*/ -name opengl -xtype l -delete find /usr/lib*/ -depth -name opengl -type d -empty -exec rm -dfv {} +
(In reply to Ryan Hill from comment #3) > It's because the glob doesn't expand if the directory doesn't exist. But > even if it does this is going to give you an error. If /usr/lib is a > symlink to /usr/lib64 find will end up passing two paths to rmdir, and > obviously the second will fail. > > I don't think -xtype is portable. I can't remember if we require gnu find. We do. > Something like this should work: > > find /usr/lib*/ -name opengl -xtype l -delete > find /usr/lib*/ -depth -name opengl -type d -empty -exec rm -dfv {} + Nope. It will find random 'opengl' symlinks and directories throughout /usr/lib*.
+ 22 Jan 2015; Michał Górny <mgorny@gentoo.org> eselect-opengl-1.3.1-r2.ebuild: + Avoid error messages when /usr/lib*/opengl does not exist, bug #537224. Used the easy way of path_exists.
(In reply to Michał Górny from comment #5) > + 22 Jan 2015; Michał Górny <mgorny@gentoo.org> > eselect-opengl-1.3.1-r2.ebuild: > + Avoid error messages when /usr/lib*/opengl does not exist, bug #537224. > > Used the easy way of path_exists. Thanks.