View previous topic :: View next topic |
Author |
Message |
sunox Tux's lil' helper
Joined: 26 Jan 2022 Posts: 136
|
Posted: Mon Jan 22, 2024 4:31 pm Post subject: How to disregard USE flag set by profile? |
|
|
I am trying a desktop profile for the first time (I used the default profile before) and it has at least one USE flag that I do not want: X. Before setting this profile I was agnostic about X at the global scope, so I would default to respecting the package-set defaults, and override these on a case-by-case basis. Is there a way to go back to this? I checked a few wiki articles and searched Google a bit and couldn't come up with an answer. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54266 Location: 56N 3W
|
Posted: Mon Jan 22, 2024 4:42 pm Post subject: |
|
|
sunox,
In make.conf
USE=foo adds foo in global scope to whatever the profile has set.
USE=-bar removes bar.
Both do nothing if the profile settings are already foo -bar .
Something similar works in package.use/ too _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
sunox Tux's lil' helper
Joined: 26 Jan 2022 Posts: 136
|
Posted: Mon Jan 22, 2024 4:55 pm Post subject: |
|
|
So if I'm understanding what you're saying correctly, adding -X in USE in make.conf does not override the package defaults? e.g. If a package defaults to having X set then -X in USE will not change this? If so then I misunderstood how USE in make.conf works pretty badly. |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4166 Location: Bavaria
|
Posted: Mon Jan 22, 2024 5:07 pm Post subject: |
|
|
sunox wrote: | So if I'm understanding what you're saying correctly, adding -X in USE in make.conf does not override the package defaults? e.g. If a package defaults to having X set then -X in USE will not change this? If so then I misunderstood how USE in make.conf works pretty badly. |
No ... portage starts with all USE-flags from your choosed profile ... THEN ... it overrides it with all USE-flags you set globally in your make.conf (the same is true for all specific settings in /etc/portage/package.use) ... and last bur not least you can (temporary) override all settings by using it in your command line; e.g.
Code: | # USE="-X" emerge -uUDvp @world |
(with -p you will see what WOULD be done).
BTW: disabling the USE-flag "X" is not a good idea - even if you want only wayland. _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
sunox Tux's lil' helper
Joined: 26 Jan 2022 Posts: 136
|
Posted: Mon Jan 22, 2024 5:13 pm Post subject: |
|
|
The above is consistent with my understanding. I think I'm being unclear so I'll try to do better.
My assumption 1: If your profile does not include X, and you do not include X in make.conf, that the default USE flags set by the packages would be used.
My assumption 2: If X is set in make.conf or in the profile, that the package defaults would be overridden, so that they will all include X support (if it is an option).
I simply want to remain agnostic about X in the global scope. I do not want to force all packages to build X support, which is what the desktop profile is doing (per my understanding). I also do not want to say in the global scope that no packages should build X support (-X in make.conf). I just want to nullify the profile's X use flag, and let packages use their default flags.
Last edited by sunox on Mon Jan 22, 2024 5:24 pm; edited 1 time in total |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1663
|
Posted: Mon Jan 22, 2024 5:24 pm Post subject: |
|
|
What you are suggesting is not possible as it stands.
Package level USE defaults have a lower priority than profile USE settings. The reasoning for this is package USE defaults are meant as safety nets when no other setting exists for them.
The only solution for you is to use the basic profile and add in what USE settings you want into a make.conf or package.use file. |
|
Back to top |
|
|
sunox Tux's lil' helper
Joined: 26 Jan 2022 Posts: 136
|
Posted: Mon Jan 22, 2024 5:31 pm Post subject: |
|
|
Ah ok, thanks for the clarification. I definitely don't want X everywhere even where I don't need it, so I guess I will go back to the basic profile and maybe borrow some of the USE flags in the desktop profile.
Thanks everyone as always. |
|
Back to top |
|
|
|