diff mbox series

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

Message ID 20240227111611.1971075-1-alex@linutronix.de
State New
Headers show
Series meta/lib/oe/sstatesig.py: do not error out if sstate files fail on os.stat() | expand

Commit Message

Alexander Kanavin Feb. 27, 2024, 11:16 a.m. UTC
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.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/lib/oe/sstatesig.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index aa891ecf0a0..61770fbe673 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -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