[poky] [PATCH 1/3] base.bbclass: enable INCOMPATIBLE_LICENSE to match slight variations
Joshua Lock
josh at linux.intel.com
Fri Feb 25 11:13:46 PST 2011
From: Joshua Lock <josh at linux.intel.com>
Add a greedy any-character match to INCOMPATIBLE_LICENSE so that we can match
different permutations of that license, i.e. if INCOMPATIBLE_LICENSE is set
to GPLv3 we should also match GPLv3+
Signed-off-by: Joshua Lock <josh at linux.intel.com>
---
meta/classes/base.bbclass | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index a674f52..3ff11d3 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -345,7 +345,14 @@ python () {
raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
- dont_want_license = bb.data.getVar('INCOMPATIBLE_LICENSE', d, 1)
+ dont_want_license = bb.data.getVar('INCOMPATIBLE_LICENSE', d, True)
+ # If dont_want_license is set add a greedy any-character match
+ # to it (if not already set) so that we can match permutations
+ # of that license. i.e. if dont_want_license is set to GPLv3 we
+ # also want to match GPLv3+
+ if dont_want_license and not dont_want_license.endswith('.+'):
+ dont_want_license = dont_want_license + '.+'
+
if dont_want_license and not pn.endswith("-native") and not pn.endswith("-cross") and not pn.endswith("-cross-initial") and not pn.endswith("-cross-intermediate"):
hosttools_whitelist = (bb.data.getVar('HOSTTOOLS_WHITELIST_%s' % dont_want_license, d, 1) or "").split()
lgplv2_whitelist = (bb.data.getVar('LGPLv2_WHITELIST_%s' % dont_want_license, d, 1) or "").split()
--
1.7.4
More information about the poky
mailing list