Skip to contentSkip to conversation

[2.8][PATCH 0/2] Patch review

bitbake Yoann Congal 1 participant 3 messages Jul 29

lore
Share & tools
lore
#0 lore raw

Please review this set of changes for scarthgap and have comments back by end of day Thursday, July 30.

Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/valkyrie/?#/builders/29/builds/4312

The following changes since commit 0880963fea4d91a034e4a6e007d23f98658ab986:

data: fix issue with varflag exclusion (2026-06-12 11:39:20 +0200)

are available in the Git repository at:

https://git.openembedded.org/bitbake-contrib stable/2.8-nut
https://git.openembedded.org/bitbake-contrib/log/?h=stable/2.8-nut

for you to fetch changes up to cff3be6f664f8f07a40727ff63eeeb24d6f5e00b:

utils: Add NFS EEXISTS/isdir failure workaround (2026-07-19 18:02:05 +0200)

----------------------------------------------------------------

Richard Purdie (1):
utils: Add NFS EEXISTS/isdir failure workaround

Yoann Congal (1):
README: Add "2.8" subject-prefix to git-send-email suggestion

 README          |  2 +-
 lib/bb/utils.py | 14 +++++++++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)
#1 lore raw

[bitbake][scarthgap][2.8][PATCH 1/2] README: Add "2.8" subject-prefix to git-send-email suggestion

From: Yoann Congal <[email protected]>

That might help new users send correct first stable patches.

---
 README | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
README +1 -1
index e9f4c858e..b5eb5ac40 100644
@@ -24,7 +24,7 @@ for full details on how to submit changes.
 As a quick guide, patches should be sent to [email protected]
 The git command to do that would be:
 
-    git send-email -M -1 --to [email protected]
+    git send-email -M -1 --to [email protected] --subject-prefix='2.8][PATCH'
 
 If you're sending a patch related to the BitBake manual, make sure you copy
 the Yocto Project documentation mailing list:
#2 lore raw

[bitbake][scarthgap][2.8][PATCH 2/2] utils: Add NFS EEXISTS/isdir failure workaround

In reply to Yoann Congal

From: Richard Purdie <[email protected]>

We're seeing cases where we see tracebacks when creating directories in SSTATE_DIR on an NFS server. The issue is that we see EEXISTS being returned but isdir() is False, likely when multiple clients try and create the same directory at the same time.

This is likely a relatively well known issue with NFS's attribute cache. There is also a way to clear the attribute cache, which is to call opendir() on the parent directory. That is what this workaround does. In the rare case we're about to fail, try that using os.listdir() and see if it helps. Testing showed that it would "fix" several cases where we'd have had failures otherwise.

[YOCTO #16351]

(cherry picked from commit 3a99c26fa581d70ed67bd08a5e0e0d0b18369a7c)
---
 lib/bb/utils.py | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
lib/bb/utils.py +13 -1
index 1b4fb93a3..976fe73bc 100644
@@ -763,8 +763,20 @@ def mkdirhier(directory):
     try:
         os.makedirs(directory)
     except OSError as e:
-        if e.errno != errno.EEXIST or not os.path.isdir(directory):
+        if e.errno != errno.EEXIST:
             raise e
+        if os.path.isdir(directory):
+            return
+        # We can end up here if there is a race between two mkdirs on an NFS mount,
+        # which happens more often with sstate that you'd think. The server returns
+        # EEXIST but the local attribute cache is out of date. It can be refreshed with
+        # an opendir call, so try that (via listdir) and check the directory again
+        # before we really fail.
+        os.listdir(os.path.dirname(directory))
+        if os.path.isdir(directory):
+            return
+        bb.warn("mkdir: %s is not a directory?")
+        raise e
 
 def movefile(src, dest, newmtime = None, sstat = None):
     """Moves a file from src to dest, preserving all permissions and