diff options
| author | Ross Burton <ross.burton@arm.com> | 2025-06-27 14:48:44 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-07-01 08:49:37 +0100 |
| commit | 45eb6f8188cc10ad89a3342e925006e9847dd047 (patch) | |
| tree | 737caaa922737924f519dc22feba8c1f3a99d9a8 /scripts/lib | |
| parent | 1e3a4a08a2c1846c0d992afd398c9a12a4dc9a41 (diff) | |
| download | poky-45eb6f8188cc10ad89a3342e925006e9847dd047.tar.gz | |
recipetool: allow recipe create handlers to specify bitbake tasks to run
When creating a recipe there can be cases where there is a class that
does some of the recipe creation (such as cargo-update-recipe-crates).
To avoid duplication of code, look for run_task assignments in the
extravalues dictionary returned by the handler, and if it is set then
call that task after writing the recipe.
(From OE-Core rev: 629184de671cf7b86fe95fcce788dffcc3a4da8a)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
| -rw-r--r-- | scripts/lib/recipetool/create.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index b65e59de6a..5d7fcbbb98 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py | |||
| @@ -764,6 +764,7 @@ def create_recipe(args): | |||
| 764 | extrafiles = extravalues.pop('extrafiles', {}) | 764 | extrafiles = extravalues.pop('extrafiles', {}) |
| 765 | extra_pn = extravalues.pop('PN', None) | 765 | extra_pn = extravalues.pop('PN', None) |
| 766 | extra_pv = extravalues.pop('PV', None) | 766 | extra_pv = extravalues.pop('PV', None) |
| 767 | run_tasks = extravalues.pop('run_tasks', "").split() | ||
| 767 | 768 | ||
| 768 | if extra_pv and not realpv: | 769 | if extra_pv and not realpv: |
| 769 | realpv = extra_pv | 770 | realpv = extra_pv |
| @@ -918,6 +919,10 @@ def create_recipe(args): | |||
| 918 | log_info_cond('Recipe %s has been created; further editing may be required to make it fully functional' % outfile, args.devtool) | 919 | log_info_cond('Recipe %s has been created; further editing may be required to make it fully functional' % outfile, args.devtool) |
| 919 | tinfoil.modified_files() | 920 | tinfoil.modified_files() |
| 920 | 921 | ||
| 922 | for task in run_tasks: | ||
| 923 | logger.info("Running task %s" % task) | ||
| 924 | tinfoil.build_file_sync(outfile, task) | ||
| 925 | |||
| 921 | if tempsrc: | 926 | if tempsrc: |
| 922 | if args.keep_temp: | 927 | if args.keep_temp: |
| 923 | logger.info('Preserving temporary directory %s' % tempsrc) | 928 | logger.info('Preserving temporary directory %s' % tempsrc) |
