From 45eb6f8188cc10ad89a3342e925006e9847dd047 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Fri, 27 Jun 2025 14:48:44 +0100 Subject: 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 Signed-off-by: Richard Purdie --- scripts/lib/recipetool/create.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/lib/recipetool/create.py') 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): extrafiles = extravalues.pop('extrafiles', {}) extra_pn = extravalues.pop('PN', None) extra_pv = extravalues.pop('PV', None) + run_tasks = extravalues.pop('run_tasks', "").split() if extra_pv and not realpv: realpv = extra_pv @@ -918,6 +919,10 @@ def create_recipe(args): log_info_cond('Recipe %s has been created; further editing may be required to make it fully functional' % outfile, args.devtool) tinfoil.modified_files() + for task in run_tasks: + logger.info("Running task %s" % task) + tinfoil.build_file_sync(outfile, task) + if tempsrc: if args.keep_temp: logger.info('Preserving temporary directory %s' % tempsrc) -- cgit v1.2.3-54-g00ecf