Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 686442 - =sys-apps/portage-2.3.66-r1 prints confusing license list on rejection: sys-kernel/linux-firmware-20190514::gentoo (masked by: || ( ) linux-fw-redistributable license(s))
Summary: =sys-apps/portage-2.3.66-r1 prints confusing license list on rejection: sys-k...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-21 07:13 UTC by Sergei Trofimovich (RETIRED)
Modified: 2023-12-26 07:21 UTC (History)
2 users (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 Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-21 07:13:22 UTC
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.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-21 07:14:33 UTC
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 )"
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-12-26 06:46:08 UTC
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))
Comment 3 Zac Medico gentoo-dev 2023-12-26 07:08:58 UTC
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
Comment 4 Zac Medico gentoo-dev 2023-12-26 07:21:08 UTC
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]