Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 906329 - toolchain.eclass calls Portage's portageq ebuild helper via sys-devel/gcc-config
Summary: toolchain.eclass calls Portage's portageq ebuild helper via sys-devel/gcc-config
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on: 909146
Blocks: 906129
  Show dependency tree
 
Reported: 2023-05-14 13:59 UTC by Ulrich Müller
Modified: 2024-01-23 05:32 UTC (History)
2 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 Ulrich Müller gentoo-dev 2023-05-14 13:59:32 UTC
Both toolchain_pkg_postinst and toolchain_pkg_postrm call the portageq ebuild helper (indirectly, via gcc-config) which is Portage specific.

Policy reference:
https://projects.gentoo.org/pms/8/pms.html#x1-13700012.3.17
Comment 1 Ulrich Müller gentoo-dev 2023-05-14 14:33:21 UTC
gcc-config contains the following three calls to "portageq envvar":

    ABI=$(portageq envvar DEFAULT_ABI 2>/dev/null)
    GENTOO_LIBDIR=$(portageq envvar LIBDIR_"${ABI}" 2>/dev/null)
    CHOST=$(portageq envvar CHOST 2>/dev/null)

All these variables should exist in the ebuild environment, so the script could do something like this:

    ABI=${DEFAULT_ABI:-$(portageq envvar DEFAULT_ABI)}
Comment 2 Larry the Git Cow gentoo-dev 2023-05-14 17:25:56 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=6d83aec7a8d26035d81b1cafdf007135aa4ea094

commit 6d83aec7a8d26035d81b1cafdf007135aa4ea094
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-05-14 15:45:32 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-14 17:24:32 +0000

    gcc-config: Don't call portageq if the variable is already set
    
    Bug: https://bugs.gentoo.org/906329
    Acked-by: James Le Cuirot <chewi@gentoo.org>
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>
    Closes: https://github.com/gentoo/gcc-config/pull/3
    Signed-off-by: Sam James <sam@gentoo.org>

 gcc-config | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2023-05-14 17:31:41 UTC
The bug has been closed via the following commit(s):

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

commit 0df09b186df442119518611ad70d3824072f784e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-05-14 17:28:53 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-14 17:28:53 +0000

    sys-devel/gcc-config: add 2.11
    
    Closes: https://bugs.gentoo.org/906329
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc-config/Manifest               |  1 +
 sys-devel/gcc-config/gcc-config-2.11.ebuild | 60 +++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)
Comment 4 Larry the Git Cow gentoo-dev 2024-01-23 05:32:10 UTC
The bug has been referenced in the following commit(s):

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

commit b0f68ff73d9041561855f6bdc232070f30ba5bfc
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-23 05:27:20 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-23 05:28:04 +0000

    toolchain.eclass: require >=sys-devel/gcc-config-2.11 for portageq fixes
    
    Bug: https://bugs.gentoo.org/906329
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/toolchain.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)