summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2018-11-07 08:51:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-14 11:14:39 +0000
commit97c9fb7ba0735e1c4c6ae95c3150ddfd1788f1de (patch)
tree0aa9cba21dbf2afe1b23b5b524baa033ab641f0c /meta/classes/base.bbclass
parentc77d38acd63bc3b91ce0616c9595fc9a914906ba (diff)
downloadpoky-97c9fb7ba0735e1c4c6ae95c3150ddfd1788f1de.tar.gz
base.bbclass: Display name of licenses which caused SkipRecipe
Display the name of the restricted licenses which caused the recipe to be skipped. This makes it easy to determine which license or licenses are missing and need to be checked and whitelisted. (From OE-Core rev: b71cd1ec45e247db688b784697829c1b485ca9ca) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass15
1 files changed, 9 insertions, 6 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index bc9b236b84..e715ffa1b2 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -467,12 +467,15 @@ python () {
467 467
468 if bb.data.inherits_class('license', d): 468 if bb.data.inherits_class('license', d):
469 check_license_format(d) 469 check_license_format(d)
470 unmatched_license_flag = check_license_flags(d) 470 unmatched_license_flags = check_license_flags(d)
471 if unmatched_license_flag: 471 if unmatched_license_flags:
472 bb.debug(1, "Skipping %s because it has a restricted license not" 472 if len(unmatched_license_flags) == 1:
473 " whitelisted in LICENSE_FLAGS_WHITELIST" % pn) 473 message = "because it has a restricted license '{0}'. Which is not whitelisted in LICENSE_FLAGS_WHITELIST".format(unmatched_license_flags[0])
474 raise bb.parse.SkipRecipe("because it has a restricted license not" 474 else:
475 " whitelisted in LICENSE_FLAGS_WHITELIST") 475 message = "because it has restricted licenses {0}. Which are not whitelisted in LICENSE_FLAGS_WHITELIST".format(
476 ", ".join("'{0}'".format(f) for f in unmatched_license_flags))
477 bb.debug(1, "Skipping %s %s" % (pn, message))
478 raise bb.parse.SkipRecipe(message)
476 479
477 # If we're building a target package we need to use fakeroot (pseudo) 480 # If we're building a target package we need to use fakeroot (pseudo)
478 # in order to capture permissions, owners, groups and special files 481 # in order to capture permissions, owners, groups and special files