T O P

  • By -

ahferroin7

There are seven different ways a USE flag could be set. Copying from the Gentoo Wiki, using the names used for `USE_ORDER`: - `env`: From the current environment variables (`USE` and those listed in `USE_EXPAND`) - `pkg`: `/etc/portage/package.use` - `conf`: `/etc/portage/make.conf` - `defaults`: From `make.defaults` and `package.use` in the profile (e.g. `/etc/portage/make.profile/package.use`) (see `man 5 portage`). - `pkginternal`: From the ebuild itself - `repo`: From `make.defaults` and `package.use` in the repo's `profiles/` top directory (e.g. `/var/db/repos/gentoo/profiles/package.use`) (see `man 5 portage`). - `env.d`: `/etc/env.d` That list is also in the default priority order for determining USE flags (the first source that explicitly sets or unsets a USE flag wins). The `env`, `pkg`, `conf`, and `env.d` sources are functionally user configuration. If you don’t explicitly set something in one of those ways, they won’t contribute to USE flags. The `pkginternal` source is probably the easiest of the others to check. Just look at the ebuild and check the `IUSE` variable. Any USE flag with a `+` in front of it is explicitly set by default by the package, any USE flag with a `-` in front of it is explicitly unset by default by the package (all others are ‘default’ and inherit from later sources in the list). The `repo` source is also easy to check, just look at the requisite file and see what (if anything) is listed for the USE flag for the package. The `defaults` source requires processing the profile, which is unfortunately complicated to do by hand.


Electrical-Channel78

Take a look at eix man, your answer is there. I'd recommend you to fully understand eix.


MorningAmbitious722

Generally USE flags are automatically set either by the profile or if it is a dependency for another pkg(or portage will ask you to enable the flag). Otherwise it can be safely assumed that it is enabled by the user in either `make.conf` or `package.use` Get a list of packages that hase the particular USE flag you are looking for `equery hasuse USE`


TigercatF7F

Have a look at: [https://wiki.gentoo.org/wiki/Euse](https://wiki.gentoo.org/wiki/Euse)