summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-04-27 10:53:19 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-27 15:05:52 +0100
commit1d4069255b86615d1dc1e2bdcf2a75d7c594fd8b (patch)
treedfb745b3aca6d59600217d2174b5f22c3bce81d4 /scripts
parente8db1ccef362e11a0736b3e1b89555dcf2a7dfa1 (diff)
downloadpoky-1d4069255b86615d1dc1e2bdcf2a75d7c594fd8b.tar.gz
devtool: reset: avoid errors in case file no longer exists
If you manually delete files in the workspace layer (which you really shouldn't) it was possible to get yourself into the situation where you couldn't reset because we were attempting to check if the file had been modified and erroring out if it couldn't be opened. If the file's not there anymore there's not much point checking if it needs to be preserved, just skip it. (From OE-Core rev: d2d352f7b747a97a54df9d20eb1455d166aa1ee3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/devtool/standard.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 893226578a..d561e40115 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -308,7 +308,14 @@ def _check_preserve(config, recipename):
308 splitline = line.rstrip().split('|') 308 splitline = line.rstrip().split('|')
309 if splitline[0] == recipename: 309 if splitline[0] == recipename:
310 removefile = os.path.join(config.workspace_path, splitline[1]) 310 removefile = os.path.join(config.workspace_path, splitline[1])
311 md5 = bb.utils.md5_file(removefile) 311 try:
312 md5 = bb.utils.md5_file(removefile)
313 except IOError as err:
314 if err.errno == 2:
315 # File no longer exists, skip it
316 continue
317 else:
318 raise
312 if splitline[2] != md5: 319 if splitline[2] != md5:
313 bb.utils.mkdirhier(preservepath) 320 bb.utils.mkdirhier(preservepath)
314 preservefile = os.path.basename(removefile) 321 preservefile = os.path.basename(removefile)