From 3c73bbf9663d9860b729d137b8d32c9b3ea7206f Mon Sep 17 00:00:00 2001 From: Charlie Wu Date: Tue, 13 Jun 2023 12:56:18 +0000 Subject: devtool: Fix the wrong variable in srcuri_entry devtool crashes when running "update-recipe" and append changes on the recipe. "$ devtool update-recipe -a " Traceback (most recent call last): ... File "/ovss/ovss_quanta/poky/scripts/lib/devtool/standard.py", line 1636, in srcuri_entry return 'file://%s%s' % (basepath, paramstr) ^^^^^^^^ NameError: cannot access free variable 'basepath' where it is not associated with a value in enclosing scope The input variable 'fname' should have the same meaning as the variable 'basepath'. Modify the 'fname' to 'basepath' and solve the issue. (From OE-Core rev: c3231756bbc2cb5641204414ad3670d7f8607ed3) Signed-off-by: Charlie Wu Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- scripts/lib/devtool/standard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/lib/devtool/standard.py') diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 852672810a..86ca77f718 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -1629,7 +1629,7 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil else: patchdir_params = {'patchdir': relpatchdir} - def srcuri_entry(fname): + def srcuri_entry(basepath): if patchdir_params: paramstr = ';' + ';'.join('%s=%s' % (k,v) for k,v in patchdir_params.items()) else: -- cgit v1.2.3-54-g00ecf