Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 78074 - Breakage in xorg-x11-6.8.1.902 migrate_usr_x11r6_lib: creates /usr/lib/lib ->lib
Summary: Breakage in xorg-x11-6.8.1.902 migrate_usr_x11r6_lib: creates /usr/lib/lib ->lib
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-15 04:41 UTC by Ed Catmur
Modified: 2005-01-15 21:21 UTC (History)
0 users

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 Ed Catmur 2005-01-15 04:41:50 UTC
Upgrading from 6.8.1.901-r1, /usr/X11R6/lib is a symlink -> ../lib per the new layout.

In migrate_usr_x11r6_lib flow passes to ll 1338 ff:

	else
		# If ${ROOT}usr/X11R6/$(get_libdir) is a symlink ...
		einfo "  /usr/X11R6/$(get_libdir) is a symlink, continuing..."

		# for amd64 at least, lib64 symlinked to lib in <=6.8.0-r4 (except -r2),
		# so the migration doesn't work properly with just the above.
		if [ -d ${ROOT}usr/X11R6/lib ]; then
			einfo "    /usr/X11R6/lib is a directory, migrating..."

Problem is that [ -d tests true on symlinks to directories so flow passes into the inner if-branch ll 1345 ff and tries to migrate /usr/X11R6/lib to /usr/lib.

As a result we get loads of error messages

    /usr/X11R6/lib is a directory, migrating...
mv: `/usr/X11R6/lib/AbiWord-2.2' and `/usr/lib/AbiWord-2.2' are the same file
mv: `/usr/X11R6/lib/anjuta' and `/usr/lib/anjuta' are the same file
...

and ll 1350-1353:

			# Get rid of the directory
			rmdir ${ROOT}usr/X11R6/lib
			# Put a symlink in its place
			ln -s $(get_libdir) ${ROOT}usr/X11R6/lib

give the error:

rmdir: `/usr/X11R6/lib': Not a directory

and create a symlink to lib in /usr/X11R6/lib giving /usr/lib/lib -> lib broken symlink.

This breakage doesn't cause any problems at the moment but does need fixing in case extra code is introduced to the flow path that could break working systems.
I think the test line 1344 should become:

		if [ ! -L ${ROOT}usr/X11R6/lib ]; then

as used on line 1328 above:

	# If it's not a symlink (in other words, it should be a directory)
	if [ ! -L ${ROOT}usr/X11R6/$(get_libdir) ]; then

Note: although the comments in the ebuild mention amd64, this affects all arches.
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2005-01-15 21:07:06 UTC
Hmm .. I knew there must've been a reason I used ! -L, but I couldn't remember it and didn't write it down.
Comment 2 Donnie Berkholz (RETIRED) gentoo-dev 2005-01-15 21:21:02 UTC
Thanks a ton, Ed. Committed this.