diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-11-20 11:32:12 +1300 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-12-05 14:38:40 +1300 |
commit | a221cb7e303c69199c59c2d904bc73e1a0823ae7 (patch) | |
tree | eb6b667898ecf26d6246a21841379c9ed6c4becc | |
parent | 23d6dd1f733e57783cb129e598d99fbe76d758fd (diff) | |
download | openembedded-core-contrib-a221cb7e303c69199c59c2d904bc73e1a0823ae7.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.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r-- | scripts/lib/devtool/standard.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index b1669b5fb4..f59c6d6cc4 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -1781,6 +1781,13 @@ def _reset(recipes, no_clean, config, basepath, workspace): for pn in recipes: _check_preserve(config, pn) + appendfile = workspace[pn]['bbappend'] + if os.path.exists(appendfile): + # This shouldn't happen, but is possible if devtool errored out prior to + # writing the md5 file. We need to delete this here or the recipe won't + # actually be reset + os.remove(appendfile) + preservepath = os.path.join(config.workspace_path, 'attic', pn, pn) def preservedir(origdir): if os.path.exists(origdir): |