summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/insane.bbclass16
1 files changed, 13 insertions, 3 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 3558dee1b0..f9f8deffa3 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -602,7 +602,8 @@ def package_qa_check_license(workdir, d):
if not os.path.isfile(srclicfile):
raise bb.build.FuncFailed( pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile)
- if 'md5' not in parm:
+ recipemd5 = parm.get('md5', '')
+ if not recipemd5:
bb.error(pn + ": md5 checksum is not specified for ", url)
return False
beginline, endline = 0, 0
@@ -633,12 +634,21 @@ def package_qa_check_license(workdir, d):
md5chksum = bb.utils.md5_file(tmplicfile)
os.unlink(tmplicfile)
- if parm['md5'] == md5chksum:
+ if recipemd5 == md5chksum:
bb.note (pn + ": md5 checksum matched for ", url)
else:
bb.error (pn + ": md5 data is not matching for ", url)
bb.error (pn + ": The new md5 checksum is ", md5chksum)
- bb.error (pn + ": Check if the license information has changed in")
+ if beginline:
+ if endline:
+ srcfiledesc = "%s (lines %d through to %d)" % (srclicfile, beginline, endline)
+ else:
+ srcfiledesc = "%s (beginning on line %d)" % (srclicfile, beginline)
+ elif endline:
+ srcfiledesc = "%s (ending on line %d)" % (srclicfile, endline)
+ else:
+ srcfiledesc = srclicfile
+ bb.error(pn + ": Check if the license information has changed in %s to verify that the LICENSE value \"%s\" remains valid" % (srcfiledesc, lic))
sane = False
return sane