Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/2] copyleft_compliance: also print the reason for including a package
Date: Mon,  2 Apr 2012 22:37:10 +0200	[thread overview]
Message-ID: <1333399030-28619-2-git-send-email-eric@eukrea.com> (raw)
In-Reply-To: <1333399030-28619-1-git-send-email-eric@eukrea.com>

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 meta/classes/copyleft_compliance.bbclass |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/copyleft_compliance.bbclass b/meta/classes/copyleft_compliance.bbclass
index 4082e7e..3ca7337 100644
--- a/meta/classes/copyleft_compliance.bbclass
+++ b/meta/classes/copyleft_compliance.bbclass
@@ -47,14 +47,14 @@ def copyleft_should_include(d):
     exclude = oe.data.typed_value('COPYLEFT_LICENSE_EXCLUDE', d)
 
     try:
-        is_included, excluded = oe.license.is_included(d.getVar('LICENSE', True), include, exclude)
+        is_included, reason = oe.license.is_included(d.getVar('LICENSE', True), include, exclude)
     except oe.license.LicenseError as exc:
         bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
     else:
         if is_included:
-            return True, None
+            return True, 'recipe has included licenses: %s' % ', '.join(reason)
         else:
-            return False, 'recipe has excluded licenses: %s' % ', '.join(excluded)
+            return False, 'recipe has excluded licenses: %s' % ', '.join(reason)
 
 python do_prepare_copyleft_sources () {
     """Populate a tree of the recipe sources and emit patch series files"""
@@ -67,7 +67,7 @@ python do_prepare_copyleft_sources () {
         bb.debug(1, 'copyleft: %s is excluded: %s' % (p, reason))
         return
     else:
-        bb.debug(1, 'copyleft: %s is included' % p)
+        bb.debug(1, 'copyleft: %s is included: %s' % (p, reason))
 
     sources_dir = d.getVar('COPYLEFT_SOURCES_DIR', True)
     src_uri = d.getVar('SRC_URI', True).split()
-- 
1.7.7.6




  reply	other threads:[~2012-04-02 20:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-02 20:37 [PATCH 1/2] license.py: fix behaviour of copyleft_compliance Eric Bénard
2012-04-02 20:37 ` Eric Bénard [this message]
2012-04-04 16:54 ` Saul Wold

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=1333399030-28619-2-git-send-email-eric@eukrea.com \
    --to=eric@eukrea.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