summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/lib/devtool/standard.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 590dfef27e..bbbe426493 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -190,7 +190,7 @@ def add(args, config, basepath, workspace):
190 shutil.move(recipes[0], recipefile) 190 shutil.move(recipes[0], recipefile)
191 else: 191 else:
192 raise DevtoolError('Command \'%s\' did not create any recipe file:\n%s' % (e.command, e.stdout)) 192 raise DevtoolError('Command \'%s\' did not create any recipe file:\n%s' % (e.command, e.stdout))
193 attic_recipe = os.path.join(config.workspace_path, 'attic', os.path.basename(recipefile)) 193 attic_recipe = os.path.join(config.workspace_path, 'attic', recipename, os.path.basename(recipefile))
194 if os.path.exists(attic_recipe): 194 if os.path.exists(attic_recipe):
195 logger.warn('A modified recipe from a previous invocation exists in %s - you may wish to move this over the top of the new recipe if you had changes in it that you want to continue with' % attic_recipe) 195 logger.warn('A modified recipe from a previous invocation exists in %s - you may wish to move this over the top of the new recipe if you had changes in it that you want to continue with' % attic_recipe)
196 finally: 196 finally:
@@ -645,7 +645,7 @@ def _check_preserve(config, recipename):
645 import bb.utils 645 import bb.utils
646 origfile = os.path.join(config.workspace_path, '.devtool_md5') 646 origfile = os.path.join(config.workspace_path, '.devtool_md5')
647 newfile = os.path.join(config.workspace_path, '.devtool_md5_new') 647 newfile = os.path.join(config.workspace_path, '.devtool_md5_new')
648 preservepath = os.path.join(config.workspace_path, 'attic') 648 preservepath = os.path.join(config.workspace_path, 'attic', recipename)
649 with open(origfile, 'r') as f: 649 with open(origfile, 'r') as f:
650 with open(newfile, 'w') as tf: 650 with open(newfile, 'w') as tf:
651 for line in f.readlines(): 651 for line in f.readlines():
@@ -1256,7 +1256,7 @@ def reset(args, config, basepath, workspace):
1256 for pn in recipes: 1256 for pn in recipes:
1257 _check_preserve(config, pn) 1257 _check_preserve(config, pn)
1258 1258
1259 preservepath = os.path.join(config.workspace_path, 'attic', pn) 1259 preservepath = os.path.join(config.workspace_path, 'attic', pn, pn)
1260 def preservedir(origdir): 1260 def preservedir(origdir):
1261 if os.path.exists(origdir): 1261 if os.path.exists(origdir):
1262 for root, dirs, files in os.walk(origdir): 1262 for root, dirs, files in os.walk(origdir):
@@ -1265,7 +1265,7 @@ def reset(args, config, basepath, workspace):
1265 _move_file(os.path.join(origdir, fn), 1265 _move_file(os.path.join(origdir, fn),
1266 os.path.join(preservepath, fn)) 1266 os.path.join(preservepath, fn))
1267 for dn in dirs: 1267 for dn in dirs:
1268 os.rmdir(os.path.join(root, dn)) 1268 preservedir(os.path.join(root, dn))
1269 os.rmdir(origdir) 1269 os.rmdir(origdir)
1270 1270
1271 preservedir(os.path.join(config.workspace_path, 'recipes', pn)) 1271 preservedir(os.path.join(config.workspace_path, 'recipes', pn))