Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 921320 - Add an option to apply an /etc/portage/env file from a command-line option
Summary: Add an option to apply an /etc/portage/env file from a command-line option
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-03 23:01 UTC by Fat-Zer
Modified: 2024-01-24 22:28 UTC (History)
2 users (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 Fat-Zer 2024-01-03 23:01:26 UTC
It would be very convenient if there were an option to apply an /etc/portage/env file from a command line.

Imaging you need to one-time build a single package foo/bar or a group of packages for a debug/testing. In that case you have to do something like:

  CFLAGS="-Og -ggdb" CXXFLAGS="-Og -ggdb" FEATURES="splitdebug installsources" emerge foo/bar

Or you could put this into files:

  /etc/portage/env/debug.conf:
    CFLAGS="-O0 -ggdb"
    CXXFLAGS="-O0 -ggdb"
    FEATURES="splitdebug installsources"
  
  /etc/portage/package.env:
    foo/bar debug.conf

and than `emerge foo/bar`. But this uproach has some disadvantages:
 - It's too permanent (in case you want to debug the package right now, not on the next rebuild)
 - It requires root access (which isn't needed i.e. if you want just to just try `ebuild foo/bar compile` with specific flags )

I wish there were an option so It would be possible to apply an env config from a command line i.e. `emerge --env debug.conf foo/bar` and/or an env var: `PORTAGE_ENV=debug.conf ebuild /path/to/foo/bar/bar-0.ebuild compile`.

Reproducible: Always