Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 427394 - emerge --depclean wants to remove a few gcc versions
Summary: emerge --depclean wants to remove a few gcc versions
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-20 21:05 UTC by brankob
Modified: 2012-07-21 22:41 UTC (History)
0 users

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 brankob 2012-07-20 21:05:09 UTC
I have on system three gcc versions:

here's the output of equery list -i gcc:

[IP-] [  ] sys-devel/gcc-4.5.3-r2:4.5.3
[IP-] [  ] sys-devel/gcc-4.6.3:4.6.3
[IP-] [  ] sys-devel/gcc-4.7.1:4.7.1

Each of them is in their own slot. 

But emerge -pv --depclean lists gcc-4.6.3 and gcc-4.7.1 for cleaning.

Even emerging them doesn't help. Subsequent emerge --depclean still lists them for removal.





Reproducible: Always



Expected Results:  
emerge --depclean shuld leave installed versions of gcc on the system

I have portage-2.1.10.65
Comment 1 brankob 2012-07-21 14:08:45 UTC
I tried gong through with emerge --depclean.

It deleted both gcc-4.6.3 and gcc-4.7.1 ( which was selected as default compiler at the time).

It also made my system unbootable, since system for some reason couldn't do "ldconfig" neccesary to update linking path.

So  tried booting with minimal install DVD only to find that I can't mount my HDD for some reason. Gentoo Undead DVD worked. 

All I had to do is mount the root partition and do ldconfig on it.

After that, I remerged =gcc-4.6* and =gcc-4.7*.

That got me back gcc-4.6.3 and gcc-4.7.1, but emerge -pv --depclean still insists on removing them...
Comment 2 Zac Medico gentoo-dev 2012-07-21 20:14:18 UTC
What are the SLOT values recorded /var/db/pkg/sys-devel/gcc-*/SLOT?

Normally, all you have to do is something like this:

   emerge --noreplace '=gcc-4.6*' '=gcc-4.7*'

That is supposed to record sys-devel/gcc:4.6 and sys-devel/gcc:4.7 in your world file, so emerge --depclean won't remove them.
Comment 3 brankob 2012-07-21 20:38:33 UTC
cat /var/db/pkg/sys-devel/gcc-4.5.3-r2/SLOT --> 4.5.3
cat /var/db/pkg/sys-devel/gcc-4.6.3/SLOT    --> 4.6.3
cat /var/db/pkg/sys-devel/gcc-4.7.1/SLOT    --> 4.7.1


Hmmm. emerge --noreplace did the trick.

But curious thing is that simple emerge =gcc-4.6* =gcc-4.7* did not.

It emerged the packages, but subsequent --depclean would wipe them out...
Comment 4 Zac Medico gentoo-dev 2012-07-21 20:46:20 UTC
(In reply to comment #3)
> But curious thing is that simple emerge =gcc-4.6* =gcc-4.7* did not.

That's strange, because it's supposed to work. In either case, the same create_world_atom() function is called to create the world atom.

Also, it's strange that your SLOTs contain numbers like "4.6.3" instead of just "4.6".

> It emerged the packages, but subsequent --depclean would wipe them out...

It's standard practice to try --depclean with --pretend, and use emerge --noreplace to add atoms to world if desired.
Comment 5 brankob 2012-07-21 20:59:40 UTC
Well, it seems to be working now and I don't have the time to chase this much further.

So, unless you have an idea I could try, I would consider this closed.

Thanks for help.
Comment 6 Zac Medico gentoo-dev 2012-07-21 21:05:48 UTC
Whatever triggered the problem was likely due to your abnormal SLOT values (like "4.6.3" instead of just "4.6").
Comment 7 brankob 2012-07-21 21:12:10 UTC
Maybe , but I didn't manually influence these values. At least I don't see how.

all ebulilds are straight from portage tree. 

I don't see any SLOT satement in them or anything that would suggest such behaviour.


I do have I_PROMISE_TO_SUPPLY_PATCHES_WITH_BUGS=1

in my make.conf

I think it is from the time I tried to emerge some fresh gcc, when it was requested from me..
Comment 8 Zac Medico gentoo-dev 2012-07-21 21:48:28 UTC
I think it's because you have USE=multislot enabled or something. If you don't explicitly need it, then I'd recommend to disable that flag because it's non-standard behavior that's prone to bugs.
Comment 9 brankob 2012-07-21 22:41:21 UTC
You seem to have nailed it. USE=multislot was on. 

I think I activated it because I was experimenting with some SDK for MSP430 and I needed it for msp430-binutils  but then forgotten about it...

I reemerged gcc-4.7.1 and now it's in slot 4.7.

Will do with other two gcc versions now.

Thanks.