summaryrefslogtreecommitdiffstats
path: root/meta
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
parent2fcaad20e9ec2477877b77f15f20f718ae0228dc (diff)
downloadpoky-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')
-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):
125 foundall = True 125 foundall = True
126 break 126 break
127 else: 127 else:
128 filedates[fullpath] = os.stat(fullpath).st_mtime 128 try:
129 filedates[fullpath] = os.stat(fullpath).st_mtime
130 except OSError:
131 continue
129 132
130 if not taskhashlist or (len(filedates) < 2 and not foundall): 133 if not taskhashlist or (len(filedates) < 2 and not foundall):
131 # That didn't work, look in sstate-cache 134 # That didn't work, look in sstate-cache
@@ -156,7 +159,10 @@ def find_siginfo(pn, taskname, taskhashlist, d):
156 if taskhashlist: 159 if taskhashlist:
157 hashfiles[hashval] = fullpath 160 hashfiles[hashval] = fullpath
158 else: 161 else:
159 filedates[fullpath] = os.stat(fullpath).st_mtime 162 try:
163 filedates[fullpath] = os.stat(fullpath).st_mtime
164 except:
165 continue
160 166
161 if taskhashlist: 167 if taskhashlist:
162 return hashfiles 168 return hashfiles