diff options
| -rw-r--r-- | meta/classes/insane.bbclass | 16 |
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): | |||
| 602 | if not os.path.isfile(srclicfile): | 602 | if not os.path.isfile(srclicfile): |
| 603 | raise bb.build.FuncFailed( pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile) | 603 | raise bb.build.FuncFailed( pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile) |
| 604 | 604 | ||
| 605 | if 'md5' not in parm: | 605 | recipemd5 = parm.get('md5', '') |
| 606 | if not recipemd5: | ||
| 606 | bb.error(pn + ": md5 checksum is not specified for ", url) | 607 | bb.error(pn + ": md5 checksum is not specified for ", url) |
| 607 | return False | 608 | return False |
| 608 | beginline, endline = 0, 0 | 609 | beginline, endline = 0, 0 |
| @@ -633,12 +634,21 @@ def package_qa_check_license(workdir, d): | |||
| 633 | md5chksum = bb.utils.md5_file(tmplicfile) | 634 | md5chksum = bb.utils.md5_file(tmplicfile) |
| 634 | os.unlink(tmplicfile) | 635 | os.unlink(tmplicfile) |
| 635 | 636 | ||
| 636 | if parm['md5'] == md5chksum: | 637 | if recipemd5 == md5chksum: |
| 637 | bb.note (pn + ": md5 checksum matched for ", url) | 638 | bb.note (pn + ": md5 checksum matched for ", url) |
| 638 | else: | 639 | else: |
| 639 | bb.error (pn + ": md5 data is not matching for ", url) | 640 | bb.error (pn + ": md5 data is not matching for ", url) |
| 640 | bb.error (pn + ": The new md5 checksum is ", md5chksum) | 641 | bb.error (pn + ": The new md5 checksum is ", md5chksum) |
| 641 | bb.error (pn + ": Check if the license information has changed in") | 642 | if beginline: |
| 643 | if endline: | ||
| 644 | srcfiledesc = "%s (lines %d through to %d)" % (srclicfile, beginline, endline) | ||
| 645 | else: | ||
| 646 | srcfiledesc = "%s (beginning on line %d)" % (srclicfile, beginline) | ||
| 647 | elif endline: | ||
| 648 | srcfiledesc = "%s (ending on line %d)" % (srclicfile, endline) | ||
| 649 | else: | ||
| 650 | srcfiledesc = srclicfile | ||
| 651 | bb.error(pn + ": Check if the license information has changed in %s to verify that the LICENSE value \"%s\" remains valid" % (srcfiledesc, lic)) | ||
| 642 | sane = False | 652 | sane = False |
| 643 | 653 | ||
| 644 | return sane | 654 | return sane |
