My setup: /etc/portage/make.conf: ACCEPT_LICENSE="@FREE" /etc/portage/package.license: sys-kernel/linux-firmware linux-firmware freedist no-source-code Got license update conflict today with seemingly invalid license output: $ emerge -pv1 sys-kernel/linux-firmware These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] sys-kernel/linux-firmware-20190502::gentoo USE="-savedconfig" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB !!! The following updates are masked by LICENSE changes: - sys-kernel/linux-firmware-20190514::gentoo (masked by: || ( ) linux-fw-redistributable license(s)) A copy of the 'linux-fw-redistributable' license is located at '/gentoo-ebuilds/gentoo/licenses/linux-fw-redistributable'. For more information, see the MASKED PACKAGES section in the emerge man page or refer to the Gentoo Handbook.
ebuild's licence string: LICENSE="GPL-2 GPL-2+ GPL-3 BSD MIT || ( MPL-1.1 GPL-2 ) redistributable? ( linux-fw-redistributable ( BSD-2 BSD BSD-4 ISC MIT no-source-code ) ) unknown-license? ( all-rights-reserved )"
With incoming versions of gentoo-kernel-bin, this gets even better: - sys-kernel/gentoo-kernel-bin-6.6.7::gentoo (masked by: || ( ) || ( ) || ( ) || ( ) || ( ) || ( ) || ( ) intel-ucode || ( ) || ( ) || ( ) || ( ) || ( ) linux-fw-redistributable || ( ) license(s))
Seems this goes back to the _getMissingLicenses method added initially here, though it's now the _getMaskedLicenses method of LicenseManager: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ffbff569ac5769449d4f106b7b6beb37db03c0f6 commit ffbff569ac5769449d4f106b7b6beb37db03c0f6 Author: Zac Medico <zmedico@gentoo.org> Date: 2007-03-20 09:52:15 +0000 Implement license visibility filtering for GLEP 23, bug #17367, and bug #152593. svn path=/main/trunk/; revision=6251
The "masked by" message is now generated with this code in a _getmaskingstatus function: missing_licenses = settings._getMissingLicenses(mycpv, metadata) if missing_licenses: allowed_tokens = {"||", "(", ")"} allowed_tokens.update(missing_licenses) license_split = licenses.split() license_split = [x for x in license_split if x in allowed_tokens]