diff options
author | Charlie Wu <chiachiwu@google.com> | 2023-06-13 12:56:18 +0000 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-07-12 05:11:38 -1000 |
commit | defeae880f068916489c46e30e8ec6bb290e3c10 (patch) | |
tree | 191a6e416f4ff13a7b12540377e66121398dc3cf /scripts/lib | |
parent | c7bc5446a6dd6869a235f59fc43b76f423bcea8f (diff) | |
download | poky-defeae880f068916489c46e30e8ec6bb290e3c10.tar.gz |
devtool: Fix the wrong variable in srcuri_entry
devtool crashes when running "update-recipe" and append changes on the recipe.
"$ devtool update-recipe -a <layer> <recipe>"
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: 1487bdda6b443480e9ce45d8b8527ad61c2a50a4)
Signed-off-by: Charlie Wu <chiachiwu@google.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit c3231756bbc2cb5641204414ad3670d7f8607ed3)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/devtool/standard.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index e2a8335a62..7a005c9010 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
@@ -1628,7 +1628,7 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil | |||
1628 | else: | 1628 | else: |
1629 | patchdir_params = {'patchdir': relpatchdir} | 1629 | patchdir_params = {'patchdir': relpatchdir} |
1630 | 1630 | ||
1631 | def srcuri_entry(fname): | 1631 | def srcuri_entry(basepath): |
1632 | if patchdir_params: | 1632 | if patchdir_params: |
1633 | paramstr = ';' + ';'.join('%s=%s' % (k,v) for k,v in patchdir_params.items()) | 1633 | paramstr = ';' + ';'.join('%s=%s' % (k,v) for k,v in patchdir_params.items()) |
1634 | else: | 1634 | else: |