summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass40
1 files changed, 33 insertions, 7 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index c8ed5447e4..ef9267a126 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -389,17 +389,43 @@ python () {
389 389
390 390
391 dont_want_license = d.getVar('INCOMPATIBLE_LICENSE', True) 391 dont_want_license = d.getVar('INCOMPATIBLE_LICENSE', True)
392 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") and not pn.endswith("-crosssdk-intermediate") and not pn.endswith("-crosssdk") and not pn.endswith("-crosssdk-initial"):
393 hosttools_whitelist = (d.getVar('HOSTTOOLS_WHITELIST_%s' % dont_want_license, True) or "").split()
394 lgplv2_whitelist = (d.getVar('LGPLv2_WHITELIST_%s' % dont_want_license, True) or "").split()
395 dont_want_whitelist = (d.getVar('WHITELIST_%s' % dont_want_license, True) or "").split()
396 if pn not in hosttools_whitelist and pn not in lgplv2_whitelist and pn not in dont_want_whitelist:
397 392
393 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") and not pn.endswith("-crosssdk-intermediate") and not pn.endswith("-crosssdk") and not pn.endswith("-crosssdk-initial") and not pn.endswith("-nativesdk"):
394 # Internally, we'll use the license mapping. This way INCOMPATIBLE_LICENSE = "GPLv2" and
395 # INCOMPATIBLE_LICENSE = "GPLv2.0" will pick up all variations of GPL-2.0
396 spdx_license = return_spdx(d, dont_want_license)
397 hosttools_whitelist = (d.getVar('HOSTTOOLS_WHITELIST_%s' % dont_want_license, True) or d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split()
398 lgplv2_whitelist = (d.getVar('LGPLv2_WHITELIST_%s' % dont_want_license, True) or d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split()
399 dont_want_whitelist = (d.getVar('WHITELIST_%s' % dont_want_license, True) or d.getVar('HOSTTOOLS_WHITELIST_%s' % spdx_license, True) or "").split()
400 if pn not in hosttools_whitelist and pn not in lgplv2_whitelist and pn not in dont_want_whitelist:
398 this_license = d.getVar('LICENSE', True) 401 this_license = d.getVar('LICENSE', True)
399 if incompatible_license(d,dont_want_license): 402 # At this point we know the recipe contains an INCOMPATIBLE_LICENSE, however it may contain packages that do not.
400 bb.note("SKIPPING %s because it's %s" % (pn, this_license)) 403 packages = d.getVar('PACKAGES', True).split()
404 dont_skip_recipe = False
405 skipped_packages = {}
406 unskipped_packages = []
407 for pkg in packages:
408 if incompatible_license(d, dont_want_license, pkg):
409 skipped_packages[pkg] = this_license
410 dont_skip_recipe = True
411 else:
412 unskipped_packages.append(pkg)
413 if not unskipped_packages:
414 # if we hit here and have excluded all packages, then we can just exclude the recipe
415 dont_skip_recipe = False
416 elif skipped_packages and unskipped_packages:
417 for pkg, license in skipped_packages.iteritems():
418 bb.note("SKIPPING the package " + pkg + " at do_rootfs because it's " + this_license)
419 d.setVar('LICENSE_EXCLUSION-' + pkg, 1)
420 for index, pkg in enumerate(unskipped_packages):
421 bb.note("INCLUDING the package " + pkg)
422
423 if dont_skip_recipe is False and incompatible_license(d, dont_want_license):
424 bb.note("SKIPPING recipe %s because it's %s" % (pn, this_license))
401 raise bb.parse.SkipPackage("incompatible with license %s" % this_license) 425 raise bb.parse.SkipPackage("incompatible with license %s" % this_license)
402 426
427
428
403 srcuri = d.getVar('SRC_URI', True) 429 srcuri = d.getVar('SRC_URI', True)
404 # Svn packages should DEPEND on subversion-native 430 # Svn packages should DEPEND on subversion-native
405 if "svn://" in srcuri: 431 if "svn://" in srcuri: