Summary: | sys-apps/portage: environment overrides disregarded for build deps when using $ROOT | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Malte Starostik <bugs> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED CANTFIX | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 137867 |
Description
Malte Starostik
2015-03-17 11:41:21 UTC
(In reply to Malte Starostik from comment #0) > Working on a system install script I noticed some irregularities during an > emerge --root=... run. > The script exports a bunch of environment variables to selectively override > things like MAKEOPTS, FEATURES, and PORTAGE_ELOG_SYSTEM. Only because of > the latter (PORTAGE_ELOG_SYSTEM is otherwise configured in /etc/portage to > send mail and set to empty in the script), the following - to me - > unexpected behaviour showed: All those overrides work fine for packages > merged to $ROOT, but they are ignored for the build dependencies merged to > /. Now if this is intended behaviour, at least I couldn't find this > documented anywhere - and it does come as a surprise. Yes, it's intentional, because it's possible that some of the variables that are set for ROOT=/foo could be damaging for ROOT=/ (think CHOST, etc...). This applies especially when cross-compiling. There is a whitelist of variables that's allowed to pass through. For example: http://gitweb.gentoo.org/proj/portage.git/commit/?id=9cd988b0dc45ac87b3dd37203755a89f4752514f |