diff options
author | 2020-07-06 21:42:26 +0200 | |
---|---|---|
committer | 2020-07-16 22:28:40 +0100 | |
commit | 2f954473bb0e16093728d9af34bcdc13cbbdb406 (patch) | |
tree | 5aac964b873e46069eea0d1768239a18bfc8b1fa | |
parent | 67829609289fa5c13e413e64c97113fd505a207f (diff) | |
download | poky-2f954473bb0e16093728d9af34bcdc13cbbdb406.tar.gz poky-2f954473bb0e16093728d9af34bcdc13cbbdb406.tar.bz2 poky-2f954473bb0e16093728d9af34bcdc13cbbdb406.zip |
devtool: default to empty string, if LIC_FILES_CHKSUM is not available
[Bug 13971] https://bugzilla.yoctoproject.org/show_bug.cgi?id=13971
A recipe using LICENSE=CLOSED would normally not have LIC_FILES_CHKSUM
set.
If LIC_FILES_CHKSUM was not set, it would cause `devtool upgrade` to fail.
This fixes the issue by defaulting to an empty string if
LIC_FILES_CHKSUM is not found.
[YOCTO #13971]
(From OE-Core rev: 9c7f3281884c50dbd05e2966e2409255c127ebfa)
Signed-off-by: Bjarne Michelsen <bjarne_michelsen@hotmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 95e112f0f465868e98285509ea0d1a624a439ac2)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | scripts/lib/devtool/upgrade.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index cb6dce378a..327916ade3 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py @@ -550,12 +550,12 @@ def upgrade(args, config, basepath, workspace): try: logger.info('Extracting current version source...') rev1, srcsubdir1 = standard._extract_source(srctree, False, 'devtool-orig', False, config, basepath, workspace, args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides) - old_licenses = _extract_licenses(srctree, rd.getVar('LIC_FILES_CHKSUM')) + old_licenses = _extract_licenses(srctree, (rd.getVar('LIC_FILES_CHKSUM') or "")) logger.info('Extracting upgraded version source...') rev2, md5, sha256, srcbranch, srcsubdir2 = _extract_new_source(args.version, srctree, args.no_patch, args.srcrev, args.srcbranch, args.branch, args.keep_temp, tinfoil, rd) - new_licenses = _extract_licenses(srctree, rd.getVar('LIC_FILES_CHKSUM')) + new_licenses = _extract_licenses(srctree, (rd.getVar('LIC_FILES_CHKSUM') or "")) license_diff = _generate_license_diff(old_licenses, new_licenses) rf, copied = _create_new_recipe(args.version, md5, sha256, args.srcrev, srcbranch, srcsubdir1, srcsubdir2, config.workspace_path, tinfoil, rd, license_diff, new_licenses, srctree, args.keep_failure) except bb.process.CmdError as e: |