diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-09-06 21:55:01 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-18 11:07:29 +0100 |
commit | 3fde63363ab90672d6baf204c2b2dca98320fe7d (patch) | |
tree | 17bd84f02a82e57ce9068aafc28338bf282de835 /scripts/lib/devtool/upgrade.py | |
parent | 10af6d86b3effc523cfa0ec49741c5b02ee2cf86 (diff) | |
download | poky-3fde63363ab90672d6baf204c2b2dca98320fe7d.tar.gz |
devtool: ensure recipes devtool is working on are unlocked within the eSDK
Alongside reworking the way devtool extracts source, we now need to
ensure that within the extensible SDK where task signatures are locked,
the signatures of the tasks for the recipes being worked on get unlocked
at the right time or otherwise we'll now get taskhash mismatches when
running devtool modify on a recipe that was included in the eSDK such as
the kernel (due to a separate bug). The existing mechanism for
auto-unlocking recipes was a little weak and was happening too late, so
I've reimplemented it so that:
(a) it gets triggered immediately when the recipe/append is created
(b) we avoid writing to the unlocked signatures file unnecessarily
(since it's a global configuration file) and
(c) within the eSDK configuration we whitelist SIGGEN_UNLOCKED_RECIPES
to avoid unnecessary reparses every time we perform one of the
devtool operations that does need to change this list.
Fixes [YOCTO #11883] (not the underlying cause, but this manifestation
of the issue).
(From OE-Core rev: 4e9a0be32fc30fb87d65da7cd1a4015c99533aff)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/upgrade.py')
-rw-r--r-- | scripts/lib/devtool/upgrade.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 39d0bd72db..f1b3ff0a99 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py | |||
@@ -33,7 +33,7 @@ sys.path = sys.path + [devtool_path] | |||
33 | 33 | ||
34 | import oe.recipeutils | 34 | import oe.recipeutils |
35 | from devtool import standard | 35 | from devtool import standard |
36 | from devtool import exec_build_env_command, setup_tinfoil, DevtoolError, parse_recipe, use_external_build | 36 | from devtool import exec_build_env_command, setup_tinfoil, DevtoolError, parse_recipe, use_external_build, update_unlockedsigs |
37 | 37 | ||
38 | logger = logging.getLogger('devtool') | 38 | logger = logging.getLogger('devtool') |
39 | 39 | ||
@@ -418,7 +418,7 @@ def upgrade(args, config, basepath, workspace): | |||
418 | 418 | ||
419 | rf = None | 419 | rf = None |
420 | try: | 420 | try: |
421 | rev1 = standard._extract_source(srctree, False, 'devtool-orig', False, config, rd, tinfoil) | 421 | rev1 = standard._extract_source(srctree, False, 'devtool-orig', False, config, basepath, workspace, args.fixed_setup, rd, tinfoil) |
422 | rev2, md5, sha256, srcbranch = _extract_new_source(args.version, srctree, args.no_patch, | 422 | rev2, md5, sha256, srcbranch = _extract_new_source(args.version, srctree, args.no_patch, |
423 | args.srcrev, args.srcbranch, args.branch, args.keep_temp, | 423 | args.srcrev, args.srcbranch, args.branch, args.keep_temp, |
424 | tinfoil, rd) | 424 | tinfoil, rd) |
@@ -432,6 +432,9 @@ def upgrade(args, config, basepath, workspace): | |||
432 | af = _write_append(rf, srctree, args.same_dir, args.no_same_dir, rev2, | 432 | af = _write_append(rf, srctree, args.same_dir, args.no_same_dir, rev2, |
433 | copied, config.workspace_path, rd) | 433 | copied, config.workspace_path, rd) |
434 | standard._add_md5(config, pn, af) | 434 | standard._add_md5(config, pn, af) |
435 | |||
436 | update_unlockedsigs(basepath, workspace, [pn], args.fixed_setup) | ||
437 | |||
435 | logger.info('Upgraded source extracted to %s' % srctree) | 438 | logger.info('Upgraded source extracted to %s' % srctree) |
436 | logger.info('New recipe is %s' % rf) | 439 | logger.info('New recipe is %s' % rf) |
437 | finally: | 440 | finally: |
@@ -457,4 +460,4 @@ def register_commands(subparsers, context): | |||
457 | group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true") | 460 | group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true") |
458 | group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true") | 461 | group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true") |
459 | parser_upgrade.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)') | 462 | parser_upgrade.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)') |
460 | parser_upgrade.set_defaults(func=upgrade) | 463 | parser_upgrade.set_defaults(func=upgrade, fixed_setup=context.fixed_setup) |