Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCHv3 6/8] package.bbclass: Report only the licenses that are incompatible
Date: Wed, 11 Dec 2019 17:48:18 +0100	[thread overview]
Message-ID: <20191211164820.26588-6-pkj@axis.com> (raw)
In-Reply-To: <20191211164820.26588-1-pkj@axis.com>

When excluding a package from being packaged due to incompatible
licenses, report the license(s) that are actually incompatible.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---

PATCHv2: Show the names of the incompatible licenses correctly.

 meta/classes/package.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index e0d6ff6701..ef3de35961 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1263,8 +1263,9 @@ python populate_packages () {
     # Handle LICENSE_EXCLUSION
     package_list = []
     for pkg in packages:
-        if d.getVar('LICENSE_EXCLUSION-' + pkg):
-            msg = "%s has an incompatible license. Excluding from packaging." % pkg
+        licenses = d.getVar('LICENSE_EXCLUSION-' + pkg)
+        if licenses:
+            msg = "Excluding %s from packaging as it has incompatible license(s): %s" % (pkg, licenses)
             package_qa_handle_error("incompatible-license", msg, d)
         else:
             package_list.append(pkg)
-- 
2.21.0



  parent reply	other threads:[~2019-12-11 16:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11 16:48 [PATCHv3 1/8] license.bbclass: Introduce AVAILABLE_LICENSES that lists all licenses Peter Kjellerstedt
2019-12-11 16:48 ` [PATCHv3 2/8] licenses.conf: Remove the SRC_DISTRIBUTE_LICENSES variable Peter Kjellerstedt
2019-12-11 16:48 ` [PATCHv3 3/8] license.bbclass: Make incompatible_pkg_license return incompatible lics Peter Kjellerstedt
2019-12-11 16:48 ` [PATCHv3 4/8] base.bbclass: Simplify the check for whitelisted licenses Peter Kjellerstedt
2019-12-11 16:48 ` [PATCHv3 5/8] base.bbclass: Report only the licenses that are incompatible for a package Peter Kjellerstedt
2019-12-11 16:48 ` Peter Kjellerstedt [this message]
2019-12-11 16:48 ` [PATCHv3 7/8] license_image.bbclass: Report only the licenses that are incompatible Peter Kjellerstedt
2019-12-11 16:48 ` [PATCHv3 8/8] incompatible_lic.py: Add tests for incompatible licenses with wildcards Peter Kjellerstedt
2020-08-20 22:35 ` [OE-core] [PATCHv3 1/8] license.bbclass: Introduce AVAILABLE_LICENSES that lists all licenses Denys Dmytriyenko
2020-08-22  4:13   ` Christopher Larson
2020-08-22 14:29     ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191211164820.26588-6-pkj@axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox