Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 895954 - sys-apps/portage-3.0.43-r1: emerge --config does not respect package.env
Summary: sys-apps/portage-3.0.43-r1: emerge --config does not respect package.env
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-23 03:42 UTC by Jay Faulkner
Modified: 2023-02-23 22:57 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 Jay Faulkner 2023-02-23 03:42:14 UTC
I recently encountered an issue with gentoo-kernel-bin (+initramfs); dracut started breaking when building initramfs on tmpfs. So, I added gentoo-kernel-bin to my package.env file to have it use a filesystem directory. This is when I discovered that only during a full emerge (emerge -1 gentoo-kernel-bin:6.1.13) was it building in my new TMPDIR; but it was building in the wrong dir when merely reconfiguring (emerge --config gentoo-kernel-bin:6.1.13).

Steps to reproduce:


Reproducible: Always

Steps to Reproduce:
1. Configure a PORTAGE_TMPDIR variable inside /etc/portage/env/test; e.g. echo PORTAGE_TMPDIR=/var/tmp/testdir >> /etc/portage/env/test. Ensure the directory is writable by portage.
2. Configure a package to use that environment, e.g. gentoo-kernel-bin: echo sys-kernel/gentoo-kernel-bin test >> /etc/portage/package.env
3. run emerge gentoo-kernel-bin. Observe that it properly uses the newly-configured PORTAGE_TMPDIR when building the initramfs.
4. Reconfigure the package with emerge --config gentoo-kernel-bin. Observe that it uses the default PORTAGE_TMPDIR, ignoring the configured package.env.
Actual Results:  
The emerge --config gentoo-kernel-bin used default environment.

Expected Results:  
The emerge --config gentoo-kernel-bin should've used the configured override environment.