diff options
author | Tim Orling <tim.orling@konsulko.com> | 2024-06-12 10:28:49 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-06-13 09:11:17 +0100 |
commit | 82d07928fe03a80c2778c23931b200ab8aff43d1 (patch) | |
tree | e5fd1addd770dd797bfce70c49a3d856dfb7e03e /scripts/lib | |
parent | ddc86a93dafbe684786116e969ece67735246779 (diff) | |
download | poky-82d07928fe03a80c2778c23931b200ab8aff43d1.tar.gz |
devtool upgrade: enable RECIPE_UPDATE_EXTRA_TASKS
For some recipes, such as those that inherit cargo-update-recipe-crates,
we need to run additional tasks once the new sources have been unpacked.
Introduce a new variable RECIPE_UPDATE_EXTRA_TASKS which is a space-
delimited list of tasks to run after the new sources have been
unpacked in scripts/lib/devtool/upgrade.py ugrade() method.
(From OE-Core rev: 59894f3b5b0bc257837d7ce4ea684f1d8c382cec)
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/devtool/upgrade.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index a8130ed23f..8e13833b51 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py | |||
@@ -534,6 +534,15 @@ def _generate_license_diff(old_licenses, new_licenses): | |||
534 | diff = diff + line | 534 | diff = diff + line |
535 | return diff | 535 | return diff |
536 | 536 | ||
537 | def _run_recipe_update_extra_tasks(pn, rd, tinfoil): | ||
538 | tasks = [] | ||
539 | for task in (rd.getVar('RECIPE_UPDATE_EXTRA_TASKS') or '').split(): | ||
540 | logger.info('Running extra recipe update task: %s' % task) | ||
541 | res = tinfoil.build_targets(pn, task, handle_events=True) | ||
542 | |||
543 | if not res: | ||
544 | raise DevtoolError('Running extra recipe update task %s for %s failed' % (task, pn)) | ||
545 | |||
537 | def upgrade(args, config, basepath, workspace): | 546 | def upgrade(args, config, basepath, workspace): |
538 | """Entry point for the devtool 'upgrade' subcommand""" | 547 | """Entry point for the devtool 'upgrade' subcommand""" |
539 | 548 | ||
@@ -609,6 +618,8 @@ def upgrade(args, config, basepath, workspace): | |||
609 | copied, config.workspace_path, rd) | 618 | copied, config.workspace_path, rd) |
610 | standard._add_md5(config, pn, af) | 619 | standard._add_md5(config, pn, af) |
611 | 620 | ||
621 | _run_recipe_update_extra_tasks(pn, rd, tinfoil) | ||
622 | |||
612 | update_unlockedsigs(basepath, workspace, args.fixed_setup, [pn]) | 623 | update_unlockedsigs(basepath, workspace, args.fixed_setup, [pn]) |
613 | 624 | ||
614 | logger.info('Upgraded source extracted to %s' % srctree) | 625 | logger.info('Upgraded source extracted to %s' % srctree) |