[OE-core] [PATCH] devtool: standard: Expand SRCREV before using it in _update_recipe_srcrev

Peter Kjellerstedt peter.kjellerstedt at axis.com
Tue Oct 10 22:01:49 UTC 2017


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'

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
---
 scripts/lib/devtool/standard.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
         if not no_remove:
             # Find list of existing patches in recipe file
             patches_dir = tempfile.mkdtemp(dir=tempdir)
-            old_srcrev = (rd.getVar('SRCREV', False) or '')
+            old_srcrev = rd.getVar('SRCREV') or ''
             upd_p, new_p, del_p = _export_patches(srctree, rd, old_srcrev,
                                                   patches_dir)
             logger.debug('Patches: update %s, new %s, delete %s' % (dict(upd_p), dict(new_p), dict(del_p)))
-- 
2.12.0




More information about the Openembedded-core mailing list