Currently we set USE="cli" in default/linux/make.defaults: >profiles/default/linux/make.defaults:26:USE="${USE} cli pcre" This is a pretty odd choice. We even disable it in hardened! >profiles/features/hardened/make.defaults:25:USE="${USE} -cli" We should really just inline +cli where it makes sense in ebuilds and remove this enabling-by-default. The current situation caused a problem when adding USE=cli to tree-sitter because it has heavy dependencies and they ended up using USE=ts-cli to avoid it being enabled by default for now.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5591d00f60e810160f78fa32a66fdbed591ddb7f commit 5591d00f60e810160f78fa32a66fdbed591ddb7f Author: Sam James <sam@gentoo.org> AuthorDate: 2022-09-20 00:01:35 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-09-20 00:02:10 +0000 profiles/features/hardened: drop odd USE defaults This leads to poor UX and there's no reason for hardened to deviate here -- none of these things make a system more hardened, they just lead to confusion. Closes: https://bugs.gentoo.org/871720 Bug: https://bugs.gentoo.org/831045 Signed-off-by: Sam James <sam@gentoo.org> profiles/features/hardened/make.defaults | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19a28412bab445e6c35db9fd14702efbbef22c74 commit 19a28412bab445e6c35db9fd14702efbbef22c74 Author: Andreas K. Hüttel <dilfridge@gentoo.org> AuthorDate: 2022-11-12 23:20:24 +0000 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: 2022-11-12 23:21:42 +0000 profiles: drop USE="cli dri" in 23.0 Bug: https://bugs.gentoo.org/831045 Bug: https://bugs.gentoo.org/849875 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> profiles/releases/23.0/make.defaults | 6 ++++++ 1 file changed, 6 insertions(+)
> We should really just inline +cli where it makes sense in ebuilds and remove this enabling-by-default. The current profile situation makes the above suggestion unworkable. Whereas the 23.0 profile really should have nothing to say about "cli", instead it specifically says "cli -cli" (through inheritance from profiles/default/linux/make.defaults). This precludes IUSE="+cli" in ebuilds from having the intended effect: "cli" remains disabled for the package even though the user never mentioned the flag in their make.conf or package.use. The package's own IUSE="+cli" does not override the global USE="-cli" set by the profile. The only ways a user can get "cli" enabled for a package are by setting USE="cli" in make.conf or by explicitly enabling the flag in /etc/portage/package.use. It doesn't even work to set the flag in the profile's package.use, as the global USE overrides that. General question: - Why are profiles initializing a global USE variable at all? Wouldn't it be more polite to insert a "*/*" line at the top of the profile's package.use to specify the default flags for that profile? This still wouldn't allow IUSE="+cli" to work as intended, but at least then individual packages could override the defaults on their own lines further down in the profile's package.use (and in overlays' package.use).
see also bug 925520
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b29bdf91eff134ec14e92b3824961fc84a04940d commit b29bdf91eff134ec14e92b3824961fc84a04940d Author: Andreas K. Hüttel <dilfridge@gentoo.org> AuthorDate: 2024-03-22 19:34:05 +0000 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: 2024-03-22 19:36:57 +0000 profiles: Move default-on of USE=cli to 17.0 directory, so it can be "unset" in 23.0 This way the default can be overridden by in-ebuild use defaults. Bug: https://bugs.gentoo.org/831045 Bug: https://bugs.gentoo.org/925520 Closes: https://bugs.gentoo.org/927217 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> profiles/default/linux/make.defaults | 5 ++++- profiles/releases/17.0/make.defaults | 3 ++- profiles/releases/23.0/make.defaults | 3 --- 3 files changed, 6 insertions(+), 5 deletions(-)
This is fixed in the 23.0 profiles (available and stable now). Closing.