Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 951341 - sys-apps/portage: Support stateless per-package command-line USE-flags
Summary: sys-apps/portage: Support stateless per-package command-line USE-flags
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-14 13:48 UTC by Stuart Shelton
Modified: 2025-03-14 13:48 UTC (History)
0 users

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 Stuart Shelton 2025-03-14 13:48:36 UTC
Where there are two or more packages which we wish to pull-in at the same time using the same USE flag for features which we don't want to both be enabled, the end-user choices are currently:

* Perform the build in two steps: `USE="foo" emerge bar && USE="-foo" emerge baz`;

* Update `/etc/portage/package.use(/*)` and add the USE flag for one package only.

This can get more unwieldy as more packages are wanted to be pulled-in at once.

It would appear be beneficial (especially in a world of containers and CI) to be able to achieve the above in one step, and without requiring additional data to be written to `/etc/portage/`.

If there is currently no way to achieve this, then my proposal is to re-use existing ebuild syntax to allow the user to run a command such as:

```
emerge dev-libs/gobject-introspection 'dev-libs/glib[introspection]' sys-libs/libblockdev
```

… to atomically install `glib` with introspection support and `libblockdev` without, from a single invocation.

(As per ebuild syntax, multiple USE flags could be specified on a per-package basis by separating them with commas inside the square brackets)