diff options
author | Saul Wold <Saul.Wold@intel.com> | 2010-08-16 14:48:04 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-20 16:53:36 +0100 |
commit | 179e056519c5ad761b2d942d7196664874c155e4 (patch) | |
tree | e5b28703e41d0dbc77b88c8cfbaab740b90d4030 /meta/classes/base.bbclass | |
parent | e7e01e7831faf2d20fae13f356f58368c0ec99c8 (diff) | |
download | poky-179e056519c5ad761b2d942d7196664874c155e4.tar.gz |
base.bbclass: Initial work to add GPLv2 Only Build with Whitelist for GPLv3 Native tools
[tweaks from Richard Purdie]
Signed-off-by: Saul Wold <Saul.Wold@intel.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r-- | meta/classes/base.bbclass | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 6ef2baba71..843c380a9e 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass | |||
@@ -437,6 +437,7 @@ do_build[func] = "1" | |||
437 | python () { | 437 | python () { |
438 | import exceptions | 438 | import exceptions |
439 | 439 | ||
440 | pn = bb.data.getVar('PN', d, 1) | ||
440 | # If we're building a target package we need to use fakeroot (pseudo) | 441 | # If we're building a target package we need to use fakeroot (pseudo) |
441 | # in order to capture permissions, owners, groups and special files | 442 | # in order to capture permissions, owners, groups and special files |
442 | if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d): | 443 | if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d): |
@@ -464,7 +465,18 @@ python () { | |||
464 | if this_machine and not re.match(need_machine, this_machine): | 465 | if this_machine and not re.match(need_machine, this_machine): |
465 | raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine) | 466 | raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine) |
466 | 467 | ||
467 | pn = bb.data.getVar('PN', d, 1) | 468 | |
469 | dont_want_license = bb.data.getVar('INCOMPATIBLE_LICENSE', d, 1) | ||
470 | 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"): | ||
471 | gplv3_hosttools_whitelist = (bb.data.getVar("GPLv3_HOSTTOOLS_WHITELIST", d, 1) or "").split() | ||
472 | gplv3_lgplv2_whitelist = (bb.data.getVar("GPLv3_LGPLv2_WHITELIST", d, 1) or "").split() | ||
473 | gplv3_whitelist = (bb.data.getVar("GPLv3_WHITELIST", d, 1) or "").split() | ||
474 | if pn not in gplv3_hosttools_whitelist and pn not in gplv3_lgplv2_whitelist and pn not in gplv3_whitelist: | ||
475 | import re | ||
476 | this_license = bb.data.getVar('LICENSE', d, 1) | ||
477 | if this_license and re.search(dont_want_license, this_license): | ||
478 | bb.note("SKIPPING %s because it's %s" % (pn, this_license)) | ||
479 | raise bb.parse.SkipPackage("incompatible with license %s" % this_license) | ||
468 | 480 | ||
469 | # OBSOLETE in bitbake 1.7.4 | 481 | # OBSOLETE in bitbake 1.7.4 |
470 | srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1) | 482 | srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1) |