Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Why depclean doesn't remove old gcc?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
cybermc75
n00b
n00b


Joined: 19 Apr 2007
Posts: 74

PostPosted: Fri Feb 01, 2013 3:22 pm    Post subject: Why depclean doesn't remove old gcc? Reply with quote

I updated my system succesfully, as usual, with

Code:
emerge -auND world
revdep-rebuild

Seeing gcc has been updated from 4.5.4 to 4.6.3, I eselect-ed this new version but I found old versions were in the system (4.3.6 and 4.4.7).
Following the upgrade guide, I have rebuilt libtool.

emerge -avc has removed 4.5.4, but 4.3.6 and 4.4.7 are still there. However, my system works perfectly.

So, I did:
Code:

equery depends gcc-4.4.7

 * These packages depend on gcc-4.4.7:
app-admin/eselect-python-20100321 (>=sys-devel/gcc-3.4)
dev-java/icedtea-bin-6.1.11.5-r1 (>=sys-devel/gcc-4.3)
sys-devel/llvm-3.1-r2 (>=sys-devel/gcc-3.0)
sys-libs/glibc-2.15-r3 (>=sys-devel/gcc-3.4.4)
                       (arm ? >=sys-devel/gcc-4.1.0)
                       (x86 ? >=sys-devel/gcc-4.3)
                       (amd64 ? >=sys-devel/gcc-4.3)
                       (ppc ? >=sys-devel/gcc-4.1.0)
                       (ppc64 ? >=sys-devel/gcc-4.1.0)

and
Code:

equery depends gcc-4.3.6-r1

 * These packages depend on gcc-4.3.6-r1:
app-admin/eselect-python-20100321 (>=sys-devel/gcc-3.4)
dev-java/icedtea-bin-6.1.11.5-r1 (>=sys-devel/gcc-4.3)
sys-devel/llvm-3.1-r2 (>=sys-devel/gcc-3.0)
sys-libs/glibc-2.15-r3 (>=sys-devel/gcc-3.4.4)
                       (arm ? >=sys-devel/gcc-4.1.0)
                       (x86 ? >=sys-devel/gcc-4.3)
                       (amd64 ? >=sys-devel/gcc-4.3)
                       (ppc ? >=sys-devel/gcc-4.1.0)
                       (ppc64 ? >=sys-devel/gcc-4.1.0)
www-client/firefox-17.0.2 (pgo ? >=sys-devel/gcc-4.5)

I would like to ask:

1. Is it safe to emerge -aP gcc ?
2. Why depclean doesn't remove old versions?
3. Maybe I have to recompile those old packages with new gcc to remove dependencies?

Thank you.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 7667
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri Feb 01, 2013 3:29 pm    Post subject: Reply with quote

Take a look at the output of
Code:
grep gcc /var/lib/portage/world
What do you see?

- John
_________________
This space intentionally left blank.
Back to top
View user's profile Send private message
dol-sen
Developer
Developer


Joined: 30 Jun 2002
Posts: 2522
Location: Richmond, BC, Canada

PostPosted: Fri Feb 01, 2013 3:41 pm    Post subject: Reply with quote

gcc is one of those special apps that is not normally part of a depclean. If it was, just think how easy it would be to render a system unable to emerge almost any package because there was no compiler on your system. So like kernel sources they need to be manually cleaned.

Also. those equery depends listings do not indicate they are linked to those old compilers, just that they depend on a gcc of which 4.6.3 satifies that.

Just as safety precaution, it is always best to not immediately clean out an old gcc version on upgrade. Sometimes there are problems and you need to switch back to the older gcc. So it's usually best to wait a while to ensure the newly upgraded gcc is working correctly, before cleaning the old. Otherwise you may have to rescue your system with a binary pkg from the tinderbox to get your system able to emerge pkgs again.
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
LoTeK
Apprentice
Apprentice


Joined: 26 Jul 2012
Posts: 270

PostPosted: Fri Feb 01, 2013 3:47 pm    Post subject: Reply with quote

Quote:
gcc is one of those special apps that is not normally part of a depclean. If it was, just think how easy it would be to render a system unable to emerge almost any package because there was no compiler on your system. So like kernel sources they need to be manually cleaned.


But my old gcc was removed by emerge --depclean last time, why?
(http://forums.gentoo.org/viewtopic-t-947428.html)
_________________
"I want to see gamma rays! I want to hear X-rays! Do you see the absurdity of what I am? I can't even express these things properly because I have to conceptualize complex ideas in this stupid limiting spoken language!"
Back to top
View user's profile Send private message
derk
Apprentice
Apprentice


Joined: 10 Mar 2003
Posts: 273
Location: St Thomas Ontario

PostPosted: Fri Feb 01, 2013 4:47 pm    Post subject: Reply with quote

if you add a gcc slot to world accidently or on purpose ..e.g. .. emerge gcc:4.5 .. then that slot will never be removed by ... emerge -av --depclean
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 7667
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri Feb 01, 2013 4:48 pm    Post subject: Reply with quote

dol-sen wrote:
gcc is one of those special apps that is not normally part of a depclean. ...
Is it special in any way other than being part of the system set? I didn't think so.

- John
_________________
This space intentionally left blank.


Last edited by John R. Graham on Fri Feb 01, 2013 4:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 2246
Location: Dallas area

PostPosted: Fri Feb 01, 2013 4:50 pm    Post subject: Reply with quote

I always run depclean with the "-p" option just to see what "will" be removed before running it for real.
_________________
Asus m5a99fx, FX 8320 - amd64-multilib, 3.9.1-zen, glibc-2.17, gcc-4.7.3-r1, eudev
xorg-server-1.16, openbox w/lxpanel, nouveau, oss4
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 2246
Location: Dallas area

PostPosted: Fri Feb 01, 2013 4:56 pm    Post subject: Reply with quote

LoTeK wrote:
But my old gcc was removed by emerge --depclean last time, why?
(http://forums.gentoo.org/viewtopic-t-947428.html)


It shouldn't remove all gcc's, it should leave at least one.

Quote:
if you add a gcc slot to world accidently or on purpose ..e.g. .. emerge gcc:4.5 .. then that slot will never be removed by ... emerge -av --depclean


I've done that before just to keep an old one around for a while.
_________________
Asus m5a99fx, FX 8320 - amd64-multilib, 3.9.1-zen, glibc-2.17, gcc-4.7.3-r1, eudev
xorg-server-1.16, openbox w/lxpanel, nouveau, oss4
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 7667
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri Feb 01, 2013 4:56 pm    Post subject: Reply with quote

You corrected it before I could call you on it. ;)

- John
_________________
This space intentionally left blank.
Back to top
View user's profile Send private message
dol-sen
Developer
Developer


Joined: 30 Jun 2002
Posts: 2522
Location: Richmond, BC, Canada

PostPosted: Fri Feb 01, 2013 5:04 pm    Post subject: Reply with quote

OK, it must be faulty brain cells. :( I was sure it was excluded, but apparently it will keep at least one gcc and depclean the rest. Aside from any versions included in the world file.
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 2246
Location: Dallas area

PostPosted: Fri Feb 01, 2013 5:06 pm    Post subject: Reply with quote

John R. Graham wrote:
You corrected it before I could call you on it. ;)

- John


Yeah I realized what I was saying. :oops: LoL
_________________
Asus m5a99fx, FX 8320 - amd64-multilib, 3.9.1-zen, glibc-2.17, gcc-4.7.3-r1, eudev
xorg-server-1.16, openbox w/lxpanel, nouveau, oss4
Back to top
View user's profile Send private message
cybermc75
n00b
n00b


Joined: 19 Apr 2007
Posts: 74

PostPosted: Tue Feb 05, 2013 9:20 pm    Post subject: Reply with quote

John R. Graham wrote:
Take a look at the output of
Code:
grep gcc /var/lib/portage/world
What do you see?

- John


I got

Code:
sys-devel/gcc
sys-devel/gcc:4.3
sys-devel/gcc:4.4


I have no idea why gcc:4.3 and gcc:4.4 are there.

However I will take dol-sen suggestion and I will keep them for a while. There's a lot of unused space in my disk, after all.

Thank you very much, all.
Back to top
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 4024
Location: india

PostPosted: Wed Feb 06, 2013 5:12 am    Post subject: Reply with quote

John R. Graham wrote:
dol-sen wrote:
gcc is one of those special apps that is not normally part of a depclean. ...
Is it special in any way other than being part of the system set? I didn't think so.

- John


i have had an instance last year or so my working gcc was removed by depclean and i had to reinstall
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 7667
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Feb 06, 2013 12:53 pm    Post subject: Reply with quote

Your latest compiler probably had an issue. Best practice: Keep a couple of known working compilers in your world set. When Portage brings you a new one,
  • Check it out thoroughly,
  • Add it to the world set, and
  • Then—and only then—deselect one of the old ones.
Or, you could just keep good backups. :wink:

- John
_________________
This space intentionally left blank.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum