devtool: Support variables in SRC_URI when upgrading recipes
PATCH 1/1 devtool: Support variables in SRC_URI when upgrading recipes
From: Frieder Schrempf <[email protected]>
Currently when upgrading recipes SRC_URI doesn't get expanded which can lead to failures if variables are used in SRC_URI. Remove this limitation by always expanding SRC_URI.
--- scripts/lib/devtool/standard.py | 4 ++-- scripts/lib/devtool/upgrade.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
scripts/lib/devtool/standard.py +2 -2
@@ -1540,7 +1540,7 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi remove_files = [] patchfields = {} patchfields['SRCREV'] = srcrev - orig_src_uri = rd.getVar('SRC_URI', False) or '' + orig_src_uri = rd.getVar('SRC_URI') or '' srcuri = orig_src_uri.split() tempdir = tempfile.mkdtemp(prefix='devtool') update_srcuri = False
@@ -1672,7 +1672,7 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil updatefiles = False updaterecipe = False destpath = None - srcuri = (rd.getVar('SRC_URI', False) or '').split() + srcuri = (rd.getVar('SRC_URI') or '').split() if appendlayerdir: files = OrderedDict((os.path.join(local_files_dir, key), val) for
scripts/lib/devtool/upgrade.py +1 -1
@@ -359,7 +359,7 @@ def _create_new_recipe(newpv, checksums, srcrev, srcbranch, srcsubdir_old, srcsu newvalues['SRCREV'] = srcrev if srcbranch: - src_uri = oe.recipeutils.split_var_value(rd.getVar('SRC_URI', False) or '') + src_uri = oe.recipeutils.split_var_value(rd.getVar('SRC_URI') or '') changed = False replacing = True new_src_uri = []
Signature · 1 line
2.51.0
Am 16.09.25 um 12:09 schrieb Frieder Schrempf:
Quoted 5 lines
From: Frieder Schrempf <[email protected]>
Currently when upgrading recipes
SRC_URIdoesn't get expanded which can lead to failures if variables are used inSRC_URI. Remove this limitation by always expandingSRC_URI.
Hm, it seems like it already works on master without this patch (no idea why as this still uses getVar('SRC_URI', False). But on Scarthgap I'm getting:
ERROR: Could not decode SRC_URI: The URL: '${SRC_URI_PLATFORM_BSP}' is invalid and cannot be interpreted
Quoted 42 lines
Signed-off-by Frieder Schrempf <[email protected]>--- scripts/lib/devtool/standard.py | 4 ++-- scripts/lib/devtool/upgrade.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)scripts/lib/devtool/standard.py +2
-2@@ -1540,7 +1540,7 @@ def _update_recipe_srcrev(recipename, workspace, srctree, rd, appendlayerdir, wi remove_files = [] patchfields = {} patchfields['SRCREV'] = srcrev - orig_src_uri = rd.getVar('SRC_URI', False) or '' + orig_src_uri = rd.getVar('SRC_URI') or '' srcuri = orig_src_uri.split() tempdir = tempfile.mkdtemp(prefix='devtool') update_srcuri = False@@ -1672,7 +1672,7 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil updatefiles = False updaterecipe = False destpath = None - srcuri = (rd.getVar('SRC_URI', False) or '').split() + srcuri = (rd.getVar('SRC_URI') or '').split() if appendlayerdir: files = OrderedDict((os.path.join(local_files_dir, key), val) forscripts/lib/devtool/upgrade.py +1
-1@@ -359,7 +359,7 @@ def _create_new_recipe(newpv, checksums, srcrev, srcbranch, srcsubdir_old, srcsu newvalues['SRCREV'] = srcrev if srcbranch: - src_uri = oe.recipeutils.split_var_value(rd.getVar('SRC_URI', False) or '') + src_uri = oe.recipeutils.split_var_value(rd.getVar('SRC_URI') or '') changed = False replacing = True new_src_uri = []