aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-08-28 10:38:45 +1200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2017-08-31 11:50:26 +1200
commit6acf76beda4d824bd7edf9ab5bfbb425d4b5aa69 (patch)
treecb514d16682304b31a0772011981587715e4ce7f
parent62f1122ef166eba56441d669c6b3b3fe5f367418 (diff)
downloadopenembedded-core-contrib-6acf76beda4d824bd7edf9ab5bfbb425d4b5aa69.tar.gz
devtool: update-recipe: ensure patches get deleted in srcrev mode
Patches that we identify as having been "deleted" (i.e. patches in SRC_URI that no longer appear in the git tree) need to be dropped even if we're updating in srcrev mode. This fixes the case where HEAD of the git tree is valid upstream (i.e. no extra commits), but there are patches left over in the recipe, e.g. when we do devtool upgrade and then all of the commits rebased on top of the new branch get skipped. Fixes [YOCTO #11972]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--scripts/lib/devtool/standard.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index fa9d347693..d79ebf1a4e 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1352,9 +1352,10 @@ def _update_recipe_srcrev(srctree, rd, appendlayerdir, wildcard_version, no_remo
old_srcrev = (rd.getVar('SRCREV', False) 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)))
# Remove deleted local files and "overlapping" patches
- remove_files = list(del_f.values()) + list(upd_p.values())
+ remove_files = list(del_f.values()) + list(upd_p.values()) + list(del_p.values())
if remove_files:
removedentries = _remove_file_entries(srcuri, remove_files)[0]
update_srcuri = True