]> code.ossystems Code Review - openembedded-core.git/commitdiff
devtool: upgrade: fix removing other recipes from workspace on reset
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Sun, 22 Nov 2015 20:39:39 +0000 (09:39 +1300)
committerRobert Yang <liezhi.yang@windriver.com>
Mon, 28 Dec 2015 07:03:15 +0000 (23:03 -0800)
If you did a "devtool add" followed by "devtool upgrade" and then did
a "devtool reset" on the recipe you upgraded, the first recipe would
also be deleted from the workspace - this was because we were
erroneously adding the entire "recipes" subdirectory and its contents to
be tracked for removal on reset. Remove the unnecessary call to
os.path.dirname() that caused this.

(From OE-Core master rev: 65354e066f87df7d3138adceb22d6a05d1685904)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/devtool/standard.py

index c5c647b2f3aa40b3ea920619e1e12ce081dcdb24..d9b624d4c7a4fcb8db018d6c731cdaa7b4299c56 100644 (file)
@@ -456,7 +456,7 @@ def _add_md5(config, recipename, filename):
             f.write('%s|%s|%s\n' % (recipename, os.path.relpath(fn, config.workspace_path), md5))
 
     if os.path.isdir(filename):
-        for root, _, files in os.walk(os.path.dirname(filename)):
+        for root, _, files in os.walk(filename):
             for f in files:
                 addfile(os.path.join(root, f))
     else: