Summary: | sys-apps/portage-3.0.44: `emerge --config` command drops the exported env variables while `emerge` not | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Ryan Tsien <i> |
Component: | Core - Ebuild Support | Assignee: | Portage team <dev-portage> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | gentoo |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Ryan Tsien
2023-03-09 08:00:15 UTC
This is a side-effect of the PMS requirement that variables set in a given ebuild phase function must be preserved/restored for later phases. https://projects.gentoo.org/pms/8/pms.html#x1-11400011.2 To accomplish this, Portage saves the variables at the end of each function, and restores them before running the next one. In this case, it is treating pkg_config as a "later function". The same behavior happens in pkg_preinst and pkg_postinst when you install a binpkg, for example. I understand what you mean, that is to say, although the execution time of pkg_config may be far away from the time when the package emerges, and pkg_config may be executed many times after that, each pkg_config operation is designed to be strongly associated with the environment in which the package was installed. Although it is different from what I imagined, it is already understandable. However, if possible, I still recommend considering pkg_config as a tool to modify the package configuration multiple times in subsequent environments. |