aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-18 17:58:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-19 17:55:11 +0100
commit3df8773ed9301b0fc0e385e066a48110900136f7 (patch)
tree85246fb2943662bf937e8b337c3c5362278187b6 /meta/lib
parent2fcaad20e9ec2477877b77f15f20f718ae0228dc (diff)
downloadopenembedded-core-contrib-3df8773ed9301b0fc0e385e066a48110900136f7.tar.gz
sstatesig: Add try/except around the stat calls
Its possible sstate symlinks to other sstate mirrors which then my get removed/cleaned. If we find invalid symlinks, skip over them rather than error with a backtrace. (From OE-Core rev: 5ed9bb42abf93aa084dd23ca68cc996a94a51a10) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/sstatesig.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index acff2a0569..d58147f78f 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -125,7 +125,10 @@ def find_siginfo(pn, taskname, taskhashlist, d):
foundall = True
break
else:
- filedates[fullpath] = os.stat(fullpath).st_mtime
+ try:
+ filedates[fullpath] = os.stat(fullpath).st_mtime
+ except OSError:
+ continue
if not taskhashlist or (len(filedates) < 2 and not foundall):
# That didn't work, look in sstate-cache
@@ -156,7 +159,10 @@ def find_siginfo(pn, taskname, taskhashlist, d):
if taskhashlist:
hashfiles[hashval] = fullpath
else:
- filedates[fullpath] = os.stat(fullpath).st_mtime
+ try:
+ filedates[fullpath] = os.stat(fullpath).st_mtime
+ except:
+ continue
if taskhashlist:
return hashfiles