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.
Hmm .. I knew there must've been a reason I used ! -L, but I couldn't remember it and didn't write it down.
Thanks a ton, Ed. Committed this.