From: Julien Stephan Date: Wed, 22 Nov 2023 11:08:13 +0000 (+0100) Subject: devtool: fix update-recipe dry-run mode X-Git-Tag: yocto-5.2~4490 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=85ba125703d5b442133fd7c470b915460ee68ac9;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git devtool: fix update-recipe dry-run mode When running devtool update-recipe with --mode=srcrev AND --append switch in dry-run, we get the following error: Traceback (most recent call last): [...] Exception: destpath should be set here Fix this by removing a misplaced else statement in _update_recipe_srcrev Signed-off-by: Julien Stephan Signed-off-by: Alexandre Belloni --- diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index d53fb810071..cd79c7802cb 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -1576,11 +1576,10 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi patchfields['SRC_URI'] = '\\\n '.join(srcuri) if dry_run_outdir: logger.info('Creating bbappend (dry-run)') - else: - appendfile, destpath = oe.recipeutils.bbappend_recipe( - rd, appendlayerdir, files, wildcardver=wildcard_version, - extralines=patchfields, removevalues=removevalues, - redirect_output=dry_run_outdir) + appendfile, destpath = oe.recipeutils.bbappend_recipe( + rd, appendlayerdir, files, wildcardver=wildcard_version, + extralines=patchfields, removevalues=removevalues, + redirect_output=dry_run_outdir) else: files_dir = _determine_files_dir(rd) for basepath, path in upd_f.items():