Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 949074 - sys-apps/portage: BDEPS cannot be forced to respect environment variables when --root is used
Summary: sys-apps/portage: BDEPS cannot be forced to respect environment variables whe...
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-30 15:39 UTC by zen
Modified: 2025-01-30 16:09 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 zen 2025-01-30 15:39:58 UTC
This is somewhere between a feature request and a bug report.

When emerging packages to an alternate root, especially when overlays are used, setting the ACCEPT_KEYWORDS variable can be complicated.

If a build dependency needs ~amd64, and "ACCEPT_KEYWORDS=~amd64" was set in the environment, it will not be used for the build dependency as the environment variables are only being applied to the ROOT, not the build root.
The only way to properly set this seems to be writing in ${BROOT}/etc/portage/package.accept_keywords or similar. I think there should be a better way to set this temporarily, for a single build.

I like this idea, suggested by floppym in #gentoo-dev-help:

An arg such as "--respect-environment=none|broot|root|always", could help partially solve this, by forcing environment variables to be considered for all builds.

I'm not sure what's best here, but I think it makes sense to have a way to temporarily set options without needing to write to a file.