From: Kevin Strasser <kevin.strasser@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/1] archvier.bbclass: fix copyleft filter behavior
Date: Thu, 24 Jan 2013 15:34:15 -0800 [thread overview]
Message-ID: <ac167dd477306984edf3607e3321deec0165611e.1359069690.git.kevin.strasser@linux.intel.com> (raw)
In-Reply-To: <cover.1359069690.git.kevin.strasser@linux.intel.com>
copyleft_should_include() was only filtering out recipes that
contain a license in COPYLEFT_LICENSE_EXCLUDE. This change adds
the requirement that the recipe contain a copyleft license, as
defined by COPYLEFT_LICENSE_INCLUDE.
Also, filtering results were being mistakenly negated in tar_filter().
Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
---
meta/classes/archiver.bbclass | 6 ++++--
meta/lib/oe/license.py | 4 +++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index a4a2158..7fd4f0f 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -64,8 +64,10 @@ def copyleft_should_include(d):
else:
if is_included:
return True, 'recipe has included licenses: %s' % ', '.join(reason)
- else:
+ elif reason:
return False, 'recipe has excluded licenses: %s' % ', '.join(reason)
+ else:
+ return False, 'recipe has neither included nor excluded licenses'
def tar_filter(d):
"""
@@ -75,7 +77,7 @@ def tar_filter(d):
"""
if d.getVar('FILTER', True) == "yes":
included, reason = copyleft_should_include(d)
- if not included:
+ if included:
return False
else:
return True
diff --git a/meta/lib/oe/license.py b/meta/lib/oe/license.py
index 173e319..fc15e9e 100644
--- a/meta/lib/oe/license.py
+++ b/meta/lib/oe/license.py
@@ -112,5 +112,7 @@ def is_included(licensestr, whitelist=None, blacklist=None):
included = filter(lambda lic: include_license(lic), licenses)
if excluded:
return False, excluded
- else:
+ elif included:
return True, included
+ else:
+ return False, None
--
1.7.9.5
prev parent reply other threads:[~2013-01-24 23:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-24 23:34 [PATCH 0/1] archiver.bbclass: fix copyleft filter behavior Kevin Strasser
2013-01-24 23:34 ` Kevin Strasser [this message]
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=ac167dd477306984edf3607e3321deec0165611e.1359069690.git.kevin.strasser@linux.intel.com \
--to=kevin.strasser@linux.intel.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