From: "André Draszik" <git@andred.net>
To: openembedded-core@lists.openembedded.org
Subject: [pyro][PATCH 07/17] copyleft_filter.bbclass: restore possiblity to filter on type
Date: Fri, 6 Oct 2017 13:12:49 +0100 [thread overview]
Message-ID: <20171006121259.5817-8-git@andred.net> (raw)
In-Reply-To: <20171006121259.5817-1-git@andred.net>
From: André Draszik <adraszik@tycoint.com>
Since the changes introduced in ae9102bda398
("copyleft_filter.bbclass: Allow to filter on name"), it is
impossible to filter on the recipe type, all recipes are
treated as though they should be included if the license
matches, irrespective of the COPYLEFT_RECIPE_TYPES
variable.
Fix this.
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit e612dfa520c7d7ecf58006e82189be601204f38d)
Signed-off-by: André Draszik <adraszik@tycoint.com>
---
meta/classes/copyleft_filter.bbclass | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/meta/classes/copyleft_filter.bbclass b/meta/classes/copyleft_filter.bbclass
index 5867bb9f7e..c36bce431a 100644
--- a/meta/classes/copyleft_filter.bbclass
+++ b/meta/classes/copyleft_filter.bbclass
@@ -47,27 +47,27 @@ def copyleft_should_include(d):
import oe.license
from fnmatch import fnmatchcase as fnmatch
- included, motive = False, 'recipe did not match anything'
-
recipe_type = d.getVar('COPYLEFT_RECIPE_TYPE')
if recipe_type not in oe.data.typed_value('COPYLEFT_RECIPE_TYPES', d):
- include, motive = False, 'recipe type "%s" is excluded' % recipe_type
+ included, motive = False, 'recipe type "%s" is excluded' % recipe_type
+ else:
+ included, motive = False, 'recipe did not match anything'
- include = oe.data.typed_value('COPYLEFT_LICENSE_INCLUDE', d)
- exclude = oe.data.typed_value('COPYLEFT_LICENSE_EXCLUDE', d)
+ include = oe.data.typed_value('COPYLEFT_LICENSE_INCLUDE', d)
+ exclude = oe.data.typed_value('COPYLEFT_LICENSE_EXCLUDE', d)
- try:
- is_included, reason = oe.license.is_included(d.getVar('LICENSE'), include, exclude)
- except oe.license.LicenseError as exc:
- bb.fatal('%s: %s' % (d.getVar('PF'), exc))
- else:
- if is_included:
- if reason:
- included, motive = True, 'recipe has included licenses: %s' % ', '.join(reason)
- else:
- included, motive = False, 'recipe does not include a copyleft license'
+ try:
+ is_included, reason = oe.license.is_included(d.getVar('LICENSE'), include, exclude)
+ except oe.license.LicenseError as exc:
+ bb.fatal('%s: %s' % (d.getVar('PF'), exc))
else:
- included, motive = False, 'recipe has excluded licenses: %s' % ', '.join(reason)
+ if is_included:
+ if reason:
+ included, motive = True, 'recipe has included licenses: %s' % ', '.join(reason)
+ else:
+ included, motive = False, 'recipe does not include a copyleft license'
+ else:
+ included, motive = False, 'recipe has excluded licenses: %s' % ', '.join(reason)
if any(fnmatch(d.getVar('PN'), name) \
for name in oe.data.typed_value('COPYLEFT_PN_INCLUDE', d)):
--
2.14.2
next prev parent reply other threads:[~2017-10-06 12:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 12:12 [pyro] some backported patches André Draszik
2017-10-06 12:12 ` [pyro][PATCH 01/17] gdb: fix gdbserver not working in musl/mips context André Draszik
2017-10-06 12:12 ` [pyro][PATCH 02/17] busybox: fix a linking issue André Draszik
2017-10-06 12:12 ` [pyro][PATCH 03/17] busybox: add backported patch to support iproute 'scope' André Draszik
2017-10-06 12:12 ` [pyro][PATCH 04/17] openssh: allow to override OpenSSL HostKeys when read-only-rootfs André Draszik
2017-10-06 13:38 ` Joshua Watt
2017-10-06 12:12 ` [pyro][PATCH 05/17] selftest/archiver: add tests for recipe type filtering André Draszik
2017-10-06 12:12 ` [pyro][PATCH 06/17] selftest/archiver: only execute deploy_archives task André Draszik
2017-10-06 12:12 ` André Draszik [this message]
2017-10-06 12:12 ` [pyro][PATCH 08/17] debianutils: Add a native version (for run-parts) André Draszik
2017-10-06 12:12 ` [pyro][PATCH 09/17] ca-certificates: Fix postinst dependency issues André Draszik
2017-10-06 12:12 ` [pyro][PATCH 10/17] kernel-uimage.bbclass: Fix up generation of uImage from vmlinux André Draszik
2017-10-06 12:12 ` [pyro][PATCH 11/17] kernel-fitimage: sanitize dtb section name (unbreak MIPS) André Draszik
2017-10-06 12:12 ` [pyro][PATCH 12/17] kernel-fitimage: unbreak UBOOT_ENTRYSYMBOL support André Draszik
2017-10-06 12:12 ` [pyro][PATCH 13/17] kernel-uimage: optimise " André Draszik
2017-10-06 12:12 ` [pyro][PATCH 14/17] kernel-uboot: support compressed kernel on MIPS André Draszik
2017-10-06 12:12 ` [pyro][PATCH 15/17] kernel-fitimage: support MIPS (compressed) André Draszik
2017-10-06 12:12 ` [pyro][PATCH 16/17] curl: enable threaded resolver André Draszik
2017-10-06 12:12 ` [pyro][PATCH 17/17] useradd-staticids: don't create username-group if gid is specified André Draszik
2017-10-10 14:58 ` [pyro] some backported patches akuster808
2017-10-18 7:05 ` André Draszik
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=20171006121259.5817-8-git@andred.net \
--to=git@andred.net \
--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