Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 473598 - ARCH in prefix/linux profiles differs from primary keyword, which violates PMS
Summary: ARCH in prefix/linux profiles differs from primary keyword, which violates PMS
Status: CONFIRMED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-17 15:13 UTC by Ulrich Müller
Modified: 2022-10-14 06:20 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 Ulrich Müller gentoo-dev 2013-06-17 15:13:36 UTC
PMS says in <http://dev.gentoo.org/~ulm/pms/5/pms.html#x1-610005.3.2>:

    ARCH
        The system’s architecture. Must be a value listed in
        profiles/arch.list; see section 4.4 for more information.
        Must be equal to the primary KEYWORD for this profile.

However, this is not the case for the prefix/linux profiles. For example, the prefix/linux/amd64 profile defines ARCH="amd64" whereas the primary KEYWORD is amd64-linux.
Comment 1 Fabian Groffen gentoo-dev 2013-06-17 18:46:15 UTC
hmmm, maybe time to undo this hack and deal with the ebuilds that rely on this feature...
Comment 2 Benda Xu gentoo-dev 2013-06-18 15:32:53 UTC
looks horrible to fix.

/usr/portage $ find . -name "*.ebuild" -exec grep -E '\WARCH\W' {} + | wc -l
766

But for a part of them which really need a fix, a ${ARCH%%-*} would do. not sure how x86-fbsd reacts here.
Comment 3 Ulrich Müller gentoo-dev 2013-06-18 15:48:46 UTC
(In reply to Benda Xu from comment #2)
> looks horrible to fix.
> 
> /usr/portage $ find . -name "*.ebuild" -exec grep -E '\WARCH\W' {} + | wc -l
> 766

Considering that these lines occur in only 118 packages, that's not so many. Looking at a few of them, most seem to be false positives.
Comment 4 Fabian Groffen gentoo-dev 2013-07-03 21:02:30 UTC
(In reply to Ulrich Müller from comment #3)
> (In reply to Benda Xu from comment #2)
> > looks horrible to fix.
> > 
> > /usr/portage $ find . -name "*.ebuild" -exec grep -E '\WARCH\W' {} + | wc -l
> > 766
> 
> Considering that these lines occur in only 118 packages, that's not so many.
> Looking at a few of them, most seem to be false positives.

IMO the real danger is in ebuilds doing things like "use amd64", those vars are auto-expanded from ARCH -- the reason for tricking it, like we do.
Comment 5 Benda Xu gentoo-dev 2013-10-31 10:28:06 UTC
Prefix-rpath can be deprecated in favor of rap on Linux-kerneled systems, which uses implict keywording, so that ARCH-linux is migrated to ARCH.
Comment 6 Michael Haubenwallner (RETIRED) gentoo-dev 2020-05-04 05:46:18 UTC
Sorry for replying to old comment:

(In reply to Benda Xu from comment #5)
> Prefix-rpath can be deprecated in favor of rap on Linux-kerneled systems,
> which uses implict keywording, so that ARCH-linux is migrated to ARCH.

Please do not deprecate prefix-rpath (aka. prefix-guest, "original prefix") on Linux!

There are situations where it does make sense to use the host libc even on Linux, when applications need to load third party shared libraries - which are built against the host libc.

At the company, after another 5 years, by the end of 2019 we have created another release branch based on current Prefix-Guest (for Linux and Cygwin+MSVC), so we may not have need to be that active with public Prefix in the next years, though.
Comment 7 Ulrich Müller gentoo-dev 2022-06-07 09:03:33 UTC
This may be a candidate for a fix in the 22.0 profiles.
Comment 8 Larry the Git Cow gentoo-dev 2022-07-28 17:58:03 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bfe27dc08ea31ad160791f1e83467f9a2511f246

commit bfe27dc08ea31ad160791f1e83467f9a2511f246
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2022-07-28 17:55:07 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2022-07-28 17:57:57 +0000

    profiles/prefix/linux: use regular stable + unstable keywords
    
    Bite the bullet, and get moving with bug #473598, just share keywords
    for Prefix and non-Prefix linux installs.  It is tedious to keep the
    keywords up to date, and they are basically extremely close anyway.
    Tested this change on a fairly sizable amd64-linux install, and it
    actually resolves a lot of problems, no new problems seen, so this seems
    like the best way forwards.
    
    Step two would be to finally remove the *-linux keywords completely.
    
    Bug: https://bugs.gentoo.org/473598
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 profiles/prefix/linux/amd64/make.defaults   | 8 +++++---
 profiles/prefix/linux/ppc64/make.defaults   | 7 +++----
 profiles/prefix/linux/ppc64le/make.defaults | 7 +++----
 profiles/prefix/linux/x86/make.defaults     | 8 +++++---
 4 files changed, 16 insertions(+), 14 deletions(-)
Comment 9 Andreas K. Hüttel archtester gentoo-dev 2022-10-12 21:38:01 UTC
(In reply to Larry the Git Cow from comment #8)
> The bug has been referenced in the following commit(s):
> 
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=bfe27dc08ea31ad160791f1e83467f9a2511f246
> 
> commit bfe27dc08ea31ad160791f1e83467f9a2511f246
> Author:     Fabian Groffen <grobian@gentoo.org>
> AuthorDate: 2022-07-28 17:55:07 +0000
> Commit:     Fabian Groffen <grobian@gentoo.org>
> CommitDate: 2022-07-28 17:57:57 +0000
> 
>     profiles/prefix/linux: use regular stable + unstable keywords
>     
>     Bite the bullet, and get moving with bug #473598, just share keywords
>     for Prefix and non-Prefix linux installs.  It is tedious to keep the
>     keywords up to date, and they are basically extremely close anyway.
>     Tested this change on a fairly sizable amd64-linux install, and it
>     actually resolves a lot of problems, no new problems seen, so this seems
>     like the best way forwards.
>     
>     Step two would be to finally remove the *-linux keywords completely.
>     
>     Bug: https://bugs.gentoo.org/473598
>     Signed-off-by: Fabian Groffen <grobian@gentoo.org>
> 
>  profiles/prefix/linux/amd64/make.defaults   | 8 +++++---
>  profiles/prefix/linux/ppc64/make.defaults   | 7 +++----
>  profiles/prefix/linux/ppc64le/make.defaults | 7 +++----
>  profiles/prefix/linux/x86/make.defaults     | 8 +++++---
>  4 files changed, 16 insertions(+), 14 deletions(-)

This means it's already on the way and independent of an eventual profile bump.
Comment 10 Ulrich Müller gentoo-dev 2022-10-14 06:20:02 UTC
Does this mean that the prefix profiles in profiles.desc will have their arch keyword changed from (e.g.) amd64-linux to amd64?