Skip to contentSkip to conversation

meta/lib/oe/sstatesig.py: do not error out if sstate files fail on os.stat()

PATCH New Alexander Kanavin 1 participant 1 message Feb 27, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meta/lib/oe/sstatesig.py: do not error out if sstate files fail on os.stat()

There's an ongoing issue with the autobuilder NFS:
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/6463/steps/14/logs/stdio

The file entry exists, but os.stat returns a 'file not found; error. It's not clear how and why such entries appear, but they do produce printdiff test failures and should not be relevant in context of the printdiff.

---
 meta/lib/oe/sstatesig.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/lib/oe/sstatesig.py +4 -1
index aa891ecf0a0..61770fbe673 100644
@@ -418,7 +418,10 @@ def find_siginfo(pn, taskname, taskhashlist, d):
                 actual_hashval = get_hashval(fullpath)
                 if actual_hashval in hashfiles:
                     continue
-                hashfiles[actual_hashval] = {'path':fullpath, 'sstate':True, 'time':get_time(fullpath)}
+                try:
+                    hashfiles[actual_hashval] = {'path':fullpath, 'sstate':True, 'time':get_time(fullpath)}
+                except FileNotFoundError:
+                    bb.warn("Could not obtain mtime for {}".format(fullpath))
 
     return hashfiles
 
Signature · 1 line
2.39.2