summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2020-08-19 13:20:51 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-10 19:07:40 +0100
commitfb739bf0160f7ff55e943a40bd247095c4c479f7 (patch)
tree66de5b4adf3e494069ad589bf65b7e932e9e7861
parent43bd93ff8b1b4abd79aa1cfa78dd6733c14e5f34 (diff)
downloadpoky-fb739bf0160f7ff55e943a40bd247095c4c479f7.tar.gz
devtool: expand SRC_URI when guessing recipe update mode
* I have recipes which use variable inside SRC_URI, e.g.: ROS_BRANCH ?= "branch=release/melodic/swri_nodelet" SRC_URI = "git://github.com/swri-robotics-gbp/marti_common-release;${ROS_BRANCH};protocol=https" and devtool modify works fine, but devtool finish fails with: $ devtool finish --force-patch-refresh swri-nodelet meta-ros/meta-ros1-melodic/ ... Traceback (most recent call last): File "/OE/openembedded-core/scripts/devtool", line 334, in <module> ret = main() File "/OE/openembedded-core/scripts/devtool", line 321, in main ret = args.func(args, config, basepath, workspace) File "/OE/openembedded-core/scripts/lib/devtool/standard.py", line 2082, in finish updated, appendfile, removed = _update_recipe(args.recipename, workspace, rd, args.mode, appendlayerdir, wildcard_version=True, no_remove=False, no_report_remove=removing_original, initial_rev=args.initial_rev, dry_run_outdir=dry_run_outdir, no_overrides=args.no_overrides, force_patch_refresh=args.force_patch_refresh) File "/OE/openembedded-core/scripts/lib/devtool/standard.py", line 1737, in _update_recipe mode = _guess_recipe_update_mode(srctree, rd) File "/OE/openembedded-core/scripts/lib/devtool/standard.py", line 1721, in _guess_recipe_update_mode params = bb.fetch.decodeurl(uri)[5] File "/OE/bitbake/lib/bb/fetch2/__init__.py", line 390, in decodeurl raise MalformedUrl(url, "The URL: '%s' is invalid: parameter %s does not specify a value (missing '=')" % (url, s)) bb.fetch2.MalformedUrl: The URL: 'git://github.com/swri-robotics-gbp/marti_common-release;${ROS_BRANCH};protocol=https' is invalid: parameter ${ROS_BRANCH} does not specify a value (missing '=') let it expand the SRC_URI before trying to decode it. (From OE-Core rev: 2de84e6e767d4c3e517d7413a37700bf1991a460) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3535cfdbf3d77f550b804276f957acf859da484f) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/devtool/standard.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index bab644b83a..d140b97de1 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1711,7 +1711,7 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil
1711 1711
1712def _guess_recipe_update_mode(srctree, rdata): 1712def _guess_recipe_update_mode(srctree, rdata):
1713 """Guess the recipe update mode to use""" 1713 """Guess the recipe update mode to use"""
1714 src_uri = (rdata.getVar('SRC_URI', False) or '').split() 1714 src_uri = (rdata.getVar('SRC_URI') or '').split()
1715 git_uris = [uri for uri in src_uri if uri.startswith('git://')] 1715 git_uris = [uri for uri in src_uri if uri.startswith('git://')]
1716 if not git_uris: 1716 if not git_uris:
1717 return 'patch' 1717 return 'patch'