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
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...
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.
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...
(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.
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.
Whatever triggered the problem was likely due to your abnormal SLOT values (like "4.6.3" instead of just "4.6").
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..
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.
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.