From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 77EB5158083 for ; Thu, 18 Dec 2025 01:27:40 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 63BBB340F7D for ; Thu, 18 Dec 2025 01:27:40 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id D5D82110576; Thu, 18 Dec 2025 01:27:28 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id A70C61102C0 for ; Thu, 18 Dec 2025 01:27:28 +0000 (UTC) Received: from mop.sam.mop (2.8.3.0.0.0.0.0.0.0.0.0.0.0.0.0.a.5.c.d.c.d.9.1.0.b.8.0.1.0.0.2.ip6.arpa [IPv6:2001:8b0:19dc:dc5a::382]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp256r1 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sam) by smtp.gentoo.org (Postfix) with ESMTPSA id D42E2340DA1; Thu, 18 Dec 2025 01:27:27 +0000 (UTC) From: Sam James To: Louis Chauvet Cc: gentoo-portage-dev@lists.gentoo.org, thomas.petazzoni@bootlin.com Subject: [gentoo-portage-dev] Re: [PATCH RESEND 2/4] lib/portage/package/ebuild/_config/LicenseManager.py: Read per-profile package.license In-Reply-To: <20251217-add_package_license_to_profiles-v1-2-4bf9be62e3d9@bootlin.com> Organization: Gentoo References: <20251217-add_package_license_to_profiles-v1-0-4bf9be62e3d9@bootlin.com> <20251217-add_package_license_to_profiles-v1-2-4bf9be62e3d9@bootlin.com> User-Agent: mu4e 1.12.13; emacs 31.0.50 Date: Thu, 18 Dec 2025 01:27:25 +0000 Message-ID: <87bjjwmveq.fsf@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain X-Archives-Salt: e0516401-103e-406a-9927-b4afa92d56b7 X-Archives-Hash: d8a9730fa3988d1e7114ad548bef89f3 Louis Chauvet writes: > Currently the only way to unmask license in profile is to use the LICENSE > variable in make.defaults. This may be acceptable for "unique" licenses > (linux-fw-redistributable, only used by one package), but not practical for > "generic" licenses. > > Read profile-specific package.license in LicenseManager so per-profile > per-pacakge license can be configured. > Reviewed-by: Sam James > Suggested-by: Sam James > Signed-off-by: Louis Chauvet > --- > lib/portage/package/ebuild/_config/LicenseManager.py | 2 ++ > man/portage.5 | 1 + > 2 files changed, 3 insertions(+) > > diff --git a/lib/portage/package/ebuild/_config/LicenseManager.py b/lib/portage/package/ebuild/_config/LicenseManager.py > index c59fff6ea4f2..f515740071a7 100644 > --- a/lib/portage/package/ebuild/_config/LicenseManager.py > +++ b/lib/portage/package/ebuild/_config/LicenseManager.py > @@ -28,6 +28,8 @@ class LicenseManager: > self._read_license_groups(license_group_locations) > > if user_config: > + for profile in locations_manager.profiles: > + self._read_user_config(profile) > self._read_user_config(locations_manager.abs_user_config) > > def _read_user_config(self, abs_user_config): > diff --git a/man/portage.5 b/man/portage.5 > index d7b2063e0fc2..787fc18e1a9f 100644 > --- a/man/portage.5 > +++ b/man/portage.5 > @@ -26,6 +26,7 @@ packages.build > package.accept_keywords > package.bashrc > package.keywords > +package.license > package.mask > package.provided > package.unmask