Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 537224 - =app-admin/eselect-opengl-1.3.1-r2 - pkg_postinst(): find: `//usr/lib*/opengl': No such file or directory
Summary: =app-admin/eselect-opengl-1.3.1-r2 - pkg_postinst(): find: `//usr/lib*/opengl...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-21 11:30 UTC by Coacher
Modified: 2015-01-22 08:03 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Coacher 2015-01-21 11:30:07 UTC
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
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-21 11:35:59 UTC
Why is this a problem?
Comment 2 Coacher 2015-01-21 11:49:20 UTC
(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.
Comment 3 Ryan Hill (RETIRED) gentoo-dev 2015-01-22 04:42:01 UTC
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 {} +
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-01-22 06:39:39 UTC
(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*.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-01-22 06:45:26 UTC
+  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.
Comment 6 Coacher 2015-01-22 08:03:56 UTC
(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.