Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 945538 - USE_EXPAND variable export is unclear
Summary: USE_EXPAND variable export is unclear
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Package Manager Specification
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-01 11:34 UTC by Sam James
Modified: 2024-12-03 17:44 UTC (History)
1 user (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 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-01 11:34:40 UTC
From -pms:
"""
<sam_> for a USE_EXPAND, say, LLVM_SLOT in llvm-r1.eclass or perhaps VIDEO_CARDS in media-libs/mesa
<sam_> what guarantees that ${LLVM_SLOT} or ${VIDEO_CARDS} is defined?
<sam_> i.e. why do we export LLVM_SLOT, instead of forcing `use llvm_slot_${x}` 
<sam_> ah: For EAPIs listed in table 5.4 as supporting profile defined IUSE injection, the variables named in USE_EXPAND and USE_EXPAND_UNPREFIXED shall have their profile-provided values reduced to contain only those values that are present in IUSE_EFFECTIVE. 
<sam_> do we say it anywhere more explicitly before that? ("reduced to.." implies it's set up by an earlier constraint)
[...]
<sam_> it's ok with me if we keep it (although should consider changing it in future, perhaps), but I think we should make it clearer that is the intent if it is
<sam_> right now it is only implied
<sam_> (I think)
"""

I'm not proposing we delete this or change the behaviour, but if it's intentional, I'd like us to make it more explicit. IMO, the (only) sentence I identified that is relevant just implies it rather than stating it outright.
Comment 1 Ulrich Müller gentoo-dev 2024-12-01 12:56:36 UTC
Section 5.3.2 "Specific variables and their meanings" says:

USE_EXPAND
    Defines a list of variables which are to be treated incrementally and whose contents are to be expanded into the USE variable as passed to ebuilds. [...]

How about something like the following?

"Defines a list of variables which are to be treated incrementally. They are to be exported to the ebuild environment and their contents are to be expanded into the USE variable as passed to ebuilds."
Comment 3 Larry the Git Cow gentoo-dev 2024-12-03 17:44:38 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/pms.git/commit/?id=b99e81e2fbae616c2e4c73fe845be28572477489

commit b99e81e2fbae616c2e4c73fe845be28572477489
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2024-12-02 23:13:53 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2024-12-03 00:36:56 +0000

    Clarify that USE_EXPAND variables are exported
    
    Closes: https://bugs.gentoo.org/945538
    Reviewed-by: Sam James <sam@gentoo.org>
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 profile-variables.tex | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)