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.
Try doing it in /etc/portage/profile/package.use.mask?
Yuck. Ok, that solves this thing. Horrible inconsistency.
Yeah, I've never understood the difference either and I still wonder if there's a bug lurking or something. You're not alone!
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.
/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).