Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 509596 - sys-apps/coreutils removes /bin/dircolors when /usr/bin/dircolors exists, even when /usr is a symlink to /
Summary: sys-apps/coreutils removes /bin/dircolors when /usr/bin/dircolors exists, eve...
Status: RESOLVED FIXED
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: 2014-05-05 06:04 UTC by Duncan
Modified: 2014-05-08 19:41 UTC (History)
2 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 Duncan 2014-05-05 06:04:20 UTC
+++ This bug was initially created as a clone of Bug #224823 +++

While this bug started as that clone, it's really the result of the fix for the the above bug.

The bug trigger is that I'm running a unified /usr /, with:

/usr -> ./

Portage actually handles that well in general, and this is the first problem I've come across as a result, due not to portage but to bad assumptions in a specific ebuild.  Now I have no dircolors!

An investigation pointed me at the line in the ebuild that deletes it, and the corresponding bug cloned above. =:^(

Suggested fix: Use readlink or realpath to resolve both /usr/bin/dircolors and /bin/dircolors and only continue with the rm if they are not the same file.

Using realpath, the test clause to add before doing the rm could look like this:

[[ $(realpath /usr/bin/dircolors) != $(realpath /bin/dircolors) ]] &&
Comment 1 SpanKY gentoo-dev 2014-05-05 18:10:46 UTC
we've probably outlived that migration codepath now, so we can just delete it
Comment 2 SpanKY gentoo-dev 2014-05-08 19:41:49 UTC
should be all set now in the tree; thanks for the report!

Commit message: Drop old migration logic as we have moved way beyond it and it causes issues with /usr merge
http://sources.gentoo.org/sys-apps/coreutils/coreutils-8.22-r1.ebuild?r1=1.1&r2=1.2