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

Bug 487126

Summary: emerge --depclean should not remove active sys-devel/gcc
Product: Portage Development Reporter: Sergey S. Starikoff <Ikonta>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Status: RESOLVED DUPLICATE    
Severity: normal CC: pacho
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Sergey S. Starikoff 2013-10-06 17:12:41 UTC
Initial state:
# gcc-config -l
 [1] x86_64-pc-linux-gnu-4.6.3 *
 [2] x86_64-pc-linux-gnu-4.7.3


# emerge --depclean
…
 sys-devel/gcc
    selected: 4.6.3 
   protected: none 
     omitted: 4.7.3-r1 
…

Wants to remove active gcc, what breakes some apps.
To my mind, portage should make a check of gcc-state, as it's done for python interpreter (I remember, portage skipped removeing of python:3.1, when it was deprecated, but the active one on my system).
Maybe, the best solution will be to unify swicth mechanism using eselect-* (deprecateing gcc-config utility).

My current version of portage:
# equery b $(which emerge)
 * Searching for /usr/bin/emerge ... 
sys-apps/portage-2.2.1 (/usr/bin/emerge -> ../lib/portage/bin/emerge)

Instead of silent remove of gcc I expect excludeing it from removal list, echoing warning similiar with attemp to remove active python and remind reference to http://www.gentoo.org/doc/en/gcc-upgrading.xml
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-01-12 10:40:58 UTC
Well, gcc-config != eselect but the idea is the same.

*** This bug has been marked as a duplicate of bug 283587 ***