Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 876298 - sys-apps/portage-3.0.38.1: unable to unmask USE-flag masks from base profile
Summary: sys-apps/portage-3.0.38.1: unable to unmask USE-flag masks from base profile
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-09 10:44 UTC by Fabian Groffen
Modified: 2022-10-09 11:14 UTC (History)
1 user (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 Fabian Groffen gentoo-dev 2022-10-09 10:44:06 UTC
I'm trying to unmask a USE-flag mask from profiles/base, for example nghttp3 for net-misc/curl:

# emerge -pv curl
...
[ebuild   R    ] net-misc/curl-7.84.0::gentoo  USE="ftp http2 imap ipv6 openssl pop3 progress-meter smtp ssl tftp -adns -alt-svc -brotli -gnutls -gopher -hsts -idn -kerberos -ldap -mbedtls (-nghttp3) -nss (-quiche) -rtmp -samba -ssh -sslv3 -static-libs -telnet -test -threads -verify-sig -zstd" CURL_SSL="openssl -gnutls -mbedtls -nss" 0 KiB

nghttp3 USE-flag is masked in profiles/base/package.use.mask:495

net-misc/curl nghttp3

Trying to unmask this file via /etc/portage/package.use.mask this way doesn't work:

# cat /etc/portage/package.use.mask 

net-misc/curl -nghttp3

# emerge -pv curl
...
[ebuild   R    ] net-misc/curl-7.84.0::gentoo  USE="ftp http2 imap ipv6 openssl pop3 progress-meter smtp ssl tftp -adns -alt-svc -brotli -gnutls -gopher -hsts -idn -kerberos -ldap -mbedtls (-nghttp3) -nss (-quiche) -rtmp -samba -ssh -sslv3 -static-libs -telnet -test -threads -verify-sig -zstd" CURL_SSL="openssl -gnutls -mbedtls -nss" 0 KiB

I tried using a directory for package.use.mask too, but this seems to do the same thing.  It seems I cannot unmask the USE=nghttp3 USE-flag, nor via package.use.unmask.

As far as I can see this should be the way to unmask the flag, but maybe I'm wrong?  I tried 3 different machines, with 3 different profiles in use, same result on all of those, so either I'm doing it wrong, or Portage simply ignores or overrides the mask I put in /etc/portage/package.use.mask.

The only way I found to enable the flag is by removing it from base/profile, but that obviously isn't a permanent solution.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-09 10:48:57 UTC
Try doing it in /etc/portage/profile/package.use.mask?
Comment 2 Fabian Groffen gentoo-dev 2022-10-09 11:01:15 UTC
Yuck.  Ok, that solves this thing.  Horrible inconsistency.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-09 11:01:49 UTC
Yeah, I've never understood the difference either and I still wonder if there's a bug lurking or something. You're not alone!
Comment 4 Fabian Groffen gentoo-dev 2022-10-09 11:03:33 UTC
Too quick here, big thanks for pointing me in the right direction here!

I just did man portage, and it is in the list as you mention, things like these: https://wiki.gentoo.org/wiki//etc/portage/package.mask suggest that my memory is probably right, and it used to work.  This changed or something?  Anyway, problem solved.
Comment 5 Ionen Wolkens gentoo-dev 2022-10-09 11:14:56 UTC
/etc/portage is portage's own configuration files, and does not implement a package.use.mask.

/etc/portage/profile is PMS-style profile files which can be anything that's valid in profiles, like an overlay on top of the profile.

/etc/portage/package.mask and /etc/portage/profile/package.mask both exists but don't work the same (e.g. can't use "*/name" in the latter, profiles need the category).