Skip to contentSkip to conversation

reproducible: Fix race with externalsrc/devtool over lockfile

PATCH New Richard Purdie 1 participant 1 message Jan 18, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reproducible: Fix race with externalsrc/devtool over lockfile

We occasionally see races over the lockfile used by externalsrc/devtool when walking files for the source_date_epock calculation. Skip this file if present to avoid the issues and fix a real issue where SDE could be contaminated too.

[YOCTO #14921]

---
 meta/lib/oe/reproducible.py | 3 +++
 1 file changed, 3 insertions(+)
meta/lib/oe/reproducible.py +3 -0
index 9ac75c02e38..448befce332 100644
@@ -131,6 +131,9 @@ def get_source_date_epoch_from_youngest_file(d, sourcedir):
         files = [f for f in files if not f[0] == '.']
 
         for fname in files:
+            if fname == "singletask.lock":
+                 # Ignore externalsrc/devtool lockfile [YOCTO #14921]
+                 continue
             filename = os.path.join(root, fname)
             try:
                 mtime = int(os.lstat(filename).st_mtime)
Signature · 1 line
2.40.1