Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 255109 - sys-libs/glibc downgrade check in pkg_setup should use MERGE_TYPE (to support `emerge -B`)
Summary: sys-libs/glibc downgrade check in pkg_setup should use MERGE_TYPE (to support...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-15 23:24 UTC by Phil White
Modified: 2014-06-14 22:18 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 Phil White 2009-01-15 23:24:08 UTC
In pkg_setup, the glibc ebuild dies if it's working on a previous version of glibc than the one installed.  It should warn there and fail in pkg_preinst.

One applicable reason for people to want to build a previous version of glibc, but not install it: I build all the packages for all of my systems on my fastest system and each system installs the one appropriate.  Right now, my main box is on the latest version of glibc, so I can't build packages for more reasonable versions of glibc.

I'd make the change myself (and have in an overlay), but I have no idea what the process is to submit this sort of thing.

Reproducible: Always
Comment 1 SpanKY gentoo-dev 2009-01-16 21:44:50 UTC
most people who downgrade do it because they want to downgrade, not because they want to test compile

if you want to test compile, dont run the setup step:
ebuild <glibc ebuild> clean unpack compile install
Comment 2 Phil White 2009-01-17 06:37:19 UTC
Not 'test compile'.  I'm talking about building a package for another system.

By not fixing this, you are preventing anyone from setting up a standard build system for potentially more than one platform.

Is there a reason that moving that check would break something or cause an undesirable effect?
Comment 3 SpanKY gentoo-dev 2009-01-17 17:41:06 UTC
unless there's a way to detect portage is doing -B, then you'll have to work around the issue by doing:
ROOT=// emerge sys-libs/glibc -B

i told you why it's undesirable: people would waste time building an entire glibc (which is not fast) only to have it call die
Comment 4 Zac Medico gentoo-dev 2009-01-17 18:26:45 UTC
Maybe an ewarn message in pkg_setup would be sufficient, with the die to pkg_preinst.

There's currently no clues in the environment for the ebuild to determine that it's executing in --buildpkgonly mode. We can add an EAPI extension for that, similar to bug 154495.
Comment 5 SpanKY gentoo-dev 2013-12-25 08:34:20 UTC
once we update glibc to a newer EAPI, we can fix this
Comment 6 SpanKY gentoo-dev 2014-06-14 22:18:33 UTC
i've added the check, but it won't really start working until the EAPI is updated.  but that's being done elsewhere.

Commit message: Check MERGE_TYPE when doing downgrade check
http://sources.gentoo.org/sys-libs/glibc/files/eblits/pkg_setup.eblit?r1=1.11&r2=1.12