Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 582504 - sys-devel/gcc[-multislot] removes old, auto-upgrades active version
Summary: sys-devel/gcc[-multislot] removes old, auto-upgrades active version
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 583234 (view as bug list)
Depends on: 584610
Blocks:
  Show dependency tree
 
Reported: 2016-05-09 07:44 UTC by Patrick Lauer
Modified: 2016-06-21 18:41 UTC (History)
9 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 Patrick Lauer gentoo-dev 2016-05-09 07:44:56 UTC
[ebuild   R    ] sys-devel/gcc-4.9.3:4.9.3::gentoo  USE="cxx fortran (multilib) nls nptl openmp sanitize vtv%* (-altivec) (-awt) -cilk -debug -doc (-fixed-point) -gcj -go -graphite (-hardened) (-libssp) -multislot -nopie -nossp -objc -objc++ -objc-gc -regression-test -vanilla" 0 KiB
[uninstall     ] sys-devel/gcc-4.8.5:4.8.5::gentoo  USE="cxx fortran (multilib) nls nptl openmp sanitize (-altivec) (-awt) -debug -doc (-fixed-point) -gcj -go -graphite (-hardened) (-libssp) -mudflap -multislot -nopie -nossp -objc -objc++ -objc-gc -regression-test -vanilla" 
[blocks b      ] <sys-devel/gcc-4.9 ("<sys-devel/gcc-4.9" is blocking sys-devel/gcc-4.9.3)


Ok, so now suddenly gcc (without revbump ... grml) blocks all older versions so they get removed.

The commit that changes it is:

commit 6fd83c0c338e901db4ba47ddb87f523482fedf33
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sat Mar 12 10:53:42 2016 -0500

    toolchain.eclass: use versioned SLOT all the time

which adds this line:

+       !multislot? ( !<${CATEGORY}/gcc-4.9 )


I have no idea what this means, and why rebuilding gcc now suddenly removes 'harmless' old versions that have been there for a long time.


Bonus: with the changes to toolchain.eclass in e5fdfd991ec21885d4141440da97189f29dfa7b9  "toolchain.eclass: automatically select latest gcc-config profile when unmerging active version #529608" this now means that users get automatically upgraded to a new gcc version on install. This deviates from existing behaviour without explanation and causes lots of confusion
Comment 1 Rinaldus 2016-05-09 09:52:34 UTC
Enable "multislot" USE-flag for all your gcc versions. I have the same issue, this works for me.
Comment 2 SpanKY gentoo-dev 2016-05-09 16:27:43 UTC
this is WAI.  complain to bug 174407, or enable USE=multislot.
Comment 3 Ben Kohler gentoo-dev 2016-05-10 18:45:41 UTC
If multislot behavior is now always-on, why is there a multislot flag, which seems to do nothing except disable the blocker? Why is there a blocker at all?  Can this be explained or announced somewhere?
Comment 4 SpanKY gentoo-dev 2016-05-10 20:38:16 UTC
(In reply to Ben Kohler from comment #3)

because people complain about a large # of compiler versions sticking around and cluttering their system.  the old tradeoff was to only have one per-major version, but because of people pushing against dynamic SLOTs, that's no longer viable.  hence the new tradeoff is to have a blocker to automatically expire older versions.

the blocker is a sliding one -- it only applies to the latest stable version.  so when gcc-5 goes stable, we'll adjust the "4.9" waterline to "5".

if anyone has a reasonable tradeoff, feel free to propose one.  thus far, no one has proposed anything at all.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-05-12 11:47:55 UTC
To be honest, the use of USE=multislot doesn't seem appropriate for a USE flag. People are going to take the effort of rebuilding to not see a real change in installed files...
Comment 6 Anthony Basile gentoo-dev 2016-05-12 11:54:05 UTC
(In reply to Michał Górny from comment #5)
> To be honest, the use of USE=multislot doesn't seem appropriate for a USE
> flag. People are going to take the effort of rebuilding to not see a real
> change in installed files...

it is possible to edit /var/db/pkg/ to avoid rebuilding, albeit a bit dangerous.  nonetheless, i need multiple compilers and most users only want the latest, so i don't see why multislot isn't a useful USE flag.
Comment 7 Simon 2016-05-16 14:27:03 UTC
I might be totally misunderstanding this, but why is there a flag to enable slotting :?
Is there specific reason gcc can't use the regular slotting mechanism?

(ran into this last week as well, I have sys-devel/gcc:4.8.5 and sys-devel/gcc:4.9.3 in my world file, always do to keep the previous gcc version around).
Comment 8 SpanKY gentoo-dev 2016-05-16 20:38:11 UTC
(In reply to Simon from comment #7)

see comment #4
Comment 9 SpanKY gentoo-dev 2016-05-17 05:08:38 UTC
*** Bug 583234 has been marked as a duplicate of this bug. ***
Comment 10 Yarda 2016-05-17 16:06:31 UTC
I hit it today, it took my couple of minutes to get to this bugzilla, because I haven't noticed that this was announced anywhere. To be honest I think this is bad change. I think the flag should be on by default.
Comment 11 Simon 2016-05-18 19:01:08 UTC
(In reply to SpanKY from comment #8)
> (In reply to Simon from comment #7)
> 
> see comment #4

Thanks for the hint. What I don't really understand is why gcc would/should be different than any other package that has slots. Can you explain why it would be? (like I said, maybe I'm misunderstanding things)
Comment 12 Rostislav Devyatov 2016-05-21 11:41:19 UTC
I don't quite understand why "a large # of compiler versions" appears at all unless a user explicitly installed them. Aren't old versions removed with emerge --depclean ?
I ran into this problem when I did need several compiler versions and tried to do a standard system upgrade. The default USE flags for gcc were changed, and this caused rebuild and an error message, which was not very easy to understand and eliminate.
Comment 13 Adrian Bassett 2016-05-21 13:37:53 UTC
(In reply to SpanKY from comment #4)
> (In reply to Ben Kohler from comment #3)
> 
> because people complain about a large # of compiler versions sticking around
> and cluttering their system.  the old tradeoff was to only have one
> per-major version, but because of people pushing against dynamic SLOTs,
> that's no longer viable.  hence the new tradeoff is to have a blocker to
> automatically expire older versions.
> 
> the blocker is a sliding one -- it only applies to the latest stable
> version.  so when gcc-5 goes stable, we'll adjust the "4.9" waterline to "5".
> 
> if anyone has a reasonable tradeoff, feel free to propose one.  thus far, no
> one has proposed anything at all.

Following this thread I wonder if there aren't parallels with gcc versions building up and and a similar situtation with respect to kernel sources, which presumably accumulate rather faster for most people?  If you can cope with unmerging the latter then why is it so very different to do housekeeping on gcc?  Or are there hidden dependencies on a particular version of gcc for some apps?
Comment 14 Patrick Lauer gentoo-dev 2016-05-30 05:57:12 UTC
Let's not close bugs before the problem is fixed ...
Comment 15 Simon 2016-06-13 07:43:15 UTC
Why is this closed? The problem isn't fixed.

SpanKY can you answer comment #11?
(don't want to nudge the answer in a certain direction, that'y why I asked such an open question, but to elaboratie: I'm asking because it sounds like there's simply documentation missing on how multislot works, I wouldn't mind to address that myself)
Comment 16 Mike Gilbert gentoo-dev 2016-06-14 22:38:46 UTC
(In reply to SpanKY from comment #4)
> if anyone has a reasonable tradeoff, feel free to propose one.  thus far, no
> one has proposed anything at all.

I propose that you explain how to remove older gcc slots via a pkg_posinst message.

The blocker "solution" is worse than the problem it is trying to solve.
Comment 17 Mike Gilbert gentoo-dev 2016-06-14 22:48:25 UTC
Maybe something like this.

pkg_preinst() {
    has_version ${CATEGORY}/${PN}:${SLOT%/*}
    newslot=$?
}

pkg_postinst() {
    if [[ ${newslot} -ne 0 ]]; then
        ewarn "A new gcc slot has been installed."
        ewarn "Please switch to the new gcc slot using gcc-config."
        ewarn "Afterward, you can remove the old slot(s). For example:"
        ewarn "  emerge --depclean ${CATEGORY}/${PN}"
    fi
}
Comment 18 Mike Gilbert gentoo-dev 2016-06-20 19:29:01 UTC
Another idea: Slot based on major version in the gentoo repository, and create an overlay for the ${PV} slots.
Comment 19 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-21 15:32:39 UTC
(In reply to Mike Gilbert from comment #18)
> Another idea: Slot based on major version in the gentoo repository, and
> create an overlay for the ${PV} slots.

Since slotmoves were added, all slots are burned now and not reusable.
Comment 20 Ulrich Müller gentoo-dev 2016-06-21 18:30:28 UTC
(In reply to Michał Górny from comment #19)
> (In reply to Mike Gilbert from comment #18)
> > Another idea: Slot based on major version in the gentoo repository, and
> > create an overlay for the ${PV} slots.
> 
> Since slotmoves were added, all slots are burned now and not reusable.

Then use slot names different from the old ones. What is the problem?
Comment 21 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-21 18:40:03 UTC
Old removal no longer happens, and I think auto-upgrades are back to the way they were before.
Comment 22 Mike Gilbert gentoo-dev 2016-06-21 18:41:53 UTC
To be clear, I was just presenting some alternatives. I'm fine with the current slotting scheme; just not with the weird blocker.