summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2018-02-26 14:49:56 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-01 22:13:56 +0000
commite295135ba1175a338b63d3c45b84da6af59747b1 (patch)
tree984c1532a3ee50f09007711b1226e5544731b96e /scripts/lib
parent2f40a874248facead72b06d4ffb8c1d4da2dbcd5 (diff)
downloadpoky-e295135ba1175a338b63d3c45b84da6af59747b1.tar.gz
devtool: reset: delete bbappend file if _check_preserve() doesn't
If the .devtool_md5 file doesn't contain a reference to the bbappend file (e.g. because devtool was interrupted before it could write that out) then _check_preserve() won't delete it, so we need to delete it separately because otherwise the recipe won't actually be reset. (From OE-Core rev: 751d27600a3df18d96baaa48696acf33ee964bec) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/devtool/standard.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index f29d8cbb68..2dbb197642 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1791,6 +1791,13 @@ def _reset(recipes, no_clean, config, basepath, workspace):
1791 for pn in recipes: 1791 for pn in recipes:
1792 _check_preserve(config, pn) 1792 _check_preserve(config, pn)
1793 1793
1794 appendfile = workspace[pn]['bbappend']
1795 if os.path.exists(appendfile):
1796 # This shouldn't happen, but is possible if devtool errored out prior to
1797 # writing the md5 file. We need to delete this here or the recipe won't
1798 # actually be reset
1799 os.remove(appendfile)
1800
1794 preservepath = os.path.join(config.workspace_path, 'attic', pn, pn) 1801 preservepath = os.path.join(config.workspace_path, 'attic', pn, pn)
1795 def preservedir(origdir): 1802 def preservedir(origdir):
1796 if os.path.exists(origdir): 1803 if os.path.exists(origdir):