Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 472396 - sys-apps/coreutils breaks system after /bin is moved to /usr/bin
Summary: sys-apps/coreutils breaks system after /bin is moved to /usr/bin
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-05 12:41 UTC by gentoobugreporter1242141
Modified: 2013-06-17 01:51 UTC (History)
1 user (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 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