[oe-commits] [openembedded-core] 13/19: devtool: reset: delete bbappend file if _check_preserve() doesn't

git at git.openembedded.org git at git.openembedded.org
Wed Feb 28 11:42:36 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 150c343c70745e9203ca784d0b72100d3095bf8d
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Mon Feb 26 14:49:56 2018 +1300

    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 at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/lib/devtool/standard.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index f29d8cb..2dbb197 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):
     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):

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list