/etc/portage/package.license

From Gentoo Wiki
< /etc/portage(Redirected from Package.license)
Jump to:navigation Jump to:search

The /etc/portage/package.license file contains definitions for per-package ACCEPT_LICENSE statements. Some packages will only be allowed to be installed by accepting its license. Licenses are stored in /var/db/repos/gentoo/licenses/.

Example

root #emerge -pv linux-firmware
These are the packages that would be merged, in order:

Calculating dependencies  ... done!

!!! All ebuilds that could satisfy "linux-firmware" have been masked.
!!! One of the following masked packages is required to complete your request:
- sys-kernel/linux-firmware-99999999::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s), missing keyword)
A copy of the 'linux-fw-redistributable' license is located at '/var/db/repos/gentoo/licenses/linux-fw-redistributable'.

A copy of the 'no-source-code' license is located at '/var/db/repos/gentoo/licenses/no-source-code'.

- sys-kernel/linux-firmware-20210818::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))
- sys-kernel/linux-firmware-20210716::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))
- sys-kernel/linux-firmware-20210629::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))
- sys-kernel/linux-firmware-20210518::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))
- sys-kernel/linux-firmware-20210315::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))
- sys-kernel/linux-firmware-20210208::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))
- sys-kernel/linux-firmware-20201218::gentoo (masked by: || ( ) linux-fw-redistributable no-source-code license(s))

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

In this case, both the linux-fw-redistributable and the no-source-code licenses must be accepted. To do this, create:

FILE /etc/portage/package.licensepackage.license linux-firmware example
# Accepting both licenses for linux-firmware
sys-kernel/linux-firmware linux-fw-redistributable no-source-code

# Accepting any license that permits redistribution
sys-kernel/linux-firmware @BINARY-REDISTRIBUTABLE

Format and examples

  • Comment lines begin with # (no inline comments).
  • One DEPEND atom per line followed by additional licenses or groups.
FILE /etc/portage/package.licensepackage.license example
# Accepting google-chrome license for www-client/google-chrome for version equal or greater than 42.0.2311.90_p1
>=www-client/google-chrome-42.0.2311.90_p1 google-chrome

# Accepting google-chrome license for any version of www-client/google-chrome
www-client/google-chrome google-chrome

# Accepting google-chrome license for every www-client package at any version
www-client/* google-chrome

# Accepting google-chrome license for every package at any version
*/* google-chrome

# Accepting every license for every package at any version (not a good idea)
*/*  *

See also