summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2017-10-11 00:01:49 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-10-16 23:52:44 +0100
commitede79dea7c4595e856ac2385a7220565a2d4a00b (patch)
treee755308aa8212f46962df88bc338cd4336af82ee
parentaff0179aaba1c6ce7f3a4e02832eaed67ec34304 (diff)
downloadpoky-ede79dea7c4595e856ac2385a7220565a2d4a00b.tar.gz
devtool: standard: Expand SRCREV before using it in _update_recipe_srcrev
If SRCREV contains a variable reference, any devtool command that would try to update it would fail. E.g., if SRCREV = "R${PV}", then devtool finish without having committed any changes would fail with: oe.patch.CmdError: Command Error: 'sh -c 'git format-patch R${PV} -o /tmp/oepatchb_doareb -- .'' exited with 0 Output: fatal: bad revision 'R' (From OE-Core rev: 094499c819722ad698ccb64ec65dd439b211c31c) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.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 14e87b95a4..beea0d4c27 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1298,7 +1298,7 @@ def _update_recipe_srcrev(srctree, rd, appendlayerdir, wildcard_version, no_remo
1298 if not no_remove: 1298 if not no_remove:
1299 # Find list of existing patches in recipe file 1299 # Find list of existing patches in recipe file
1300 patches_dir = tempfile.mkdtemp(dir=tempdir) 1300 patches_dir = tempfile.mkdtemp(dir=tempdir)
1301 old_srcrev = (rd.getVar('SRCREV', False) or '') 1301 old_srcrev = rd.getVar('SRCREV') or ''
1302 upd_p, new_p, del_p = _export_patches(srctree, rd, old_srcrev, 1302 upd_p, new_p, del_p = _export_patches(srctree, rd, old_srcrev,
1303 patches_dir) 1303 patches_dir)
1304 logger.debug('Patches: update %s, new %s, delete %s' % (dict(upd_p), dict(new_p), dict(del_p))) 1304 logger.debug('Patches: update %s, new %s, delete %s' % (dict(upd_p), dict(new_p), dict(del_p)))