Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 472396

Summary: sys-apps/coreutils breaks system after /bin is moved to /usr/bin
Product: Gentoo Linux Reporter: gentoobugreporter1242141
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED WORKSFORME    
Severity: normal CC: jer
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description gentoobugreporter1242141 2013-06-05 12:41:19 UTC
I recently tried moving all the files in /bin to /usr/bin and creating a symlink from /bin to /usr/bin instead, as some other distros do. This seems to work without problems until I re-emerge coreutils.

The result is that some binaries this package tries to install get deleted instead and replaced by symlinks to /bin/$file, which obviously breaks on such a setup.

I think this part of the ebuild is responsible:

        if [[ ${USERLAND} == "GNU" ]] ; then
                cd "${D}"/usr/bin
                dodir /bin
                # move critical binaries into /bin (required by FHS)
                local fhs="cat chgrp chmod chown cp date dd df echo false ln ls
                           mkdir mknod mv pwd rm rmdir stty sync true uname"
                #mv ${fhs} ../../bin/ || die "could not move fhs bins"
                # move critical binaries into /bin (common scripts)
                local com="basename chroot cut dir dirname du env expr head mkfifo
                           mktemp readlink seq sleep sort tail touch tr tty vdir wc yes"
                #mv ${com} ../../bin/ || die "could not move common bins"
                # create a symlink for uname in /usr/bin/ since autotools require it
                local x
                #for x in ${com} uname ; do
                #       dosym /bin/${x} /usr/bin/${x} || die
                #done
        else

To fix this problem, I propose to check if /bin is a symlink and if it is the case, just do nothing.
Comment 1 SpanKY gentoo-dev 2013-06-17 01:51:29 UTC
no plan on tackling this anytime soon