[2.18][PATCH 0/2] Patch review
Please review this set of changes for wrynose/2.18 and have comments back by end of day Tuesday, July 21.
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/4214
The following changes since commit acfe02fa38b5da9e6a36c6cedcf91d4fcbefbfbd:
tests/fetch: cover checkstatus redirect auth handling (2026-06-11 11:50:29 +0200)
are available in the Git repository at:
https://git.openembedded.org/bitbake-contrib stable/2.18-nut
https://git.openembedded.org/bitbake-contrib/log/?h=stable/2.18-nut
for you to fetch changes up to fae9db3168dbff1b8c76fe9c6726a9687ff97514:
utils: Add NFS EEXISTS/isdir failure workaround (2026-07-09 17:37:07 +0200)
----------------------------------------------------------------
Ernest Van Hoecke (1):
bitbake-setup: always write newline at end of the README
Richard Purdie (1):
utils: Add NFS EEXISTS/isdir failure workaround
bin/bitbake-setup | 5 +++-- lib/bb/utils.py | 14 +++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-)
[bitbake][wrynose][2.18][PATCH 1/2] bitbake-setup: always write newline at end of the README
From: Ernest Van Hoecke <[email protected]>
When the "readme_extra" string was introduced, we dropped a newline in the "readme" multiline string. In a Python multiline string, this counts and therefore we dropped the newline at the end of the README unless readme_extra is not empty (i.e.: unless the VS Code string is included which includes a newline).
Put the newline back into the readme string and edit the VS Code extra string accordingly.
--- bin/bitbake-setup | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
bin/bitbake-setup +3 -2
@@ -415,12 +415,13 @@ def setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir, update_bb_c readme_extra = "" if init_vscode: - readme_extra = "\n\nTo edit the code in VSCode, open the workspace: code {}\n".format(workspace_file) + readme_extra = "\nTo edit the code in VSCode, open the workspace: code {}\n".format(workspace_file) readme = """{}\n\nAdditional information is in {} and {}\n Source the environment using '. {}' to run builds from the command line.\n {}\n -The bitbake configuration files (local.conf, bblayers.conf and more) can be found in {}/conf{}""".format( +The bitbake configuration files (local.conf, bblayers.conf and more) can be found in {}/conf +{}""".format( bitbake_config["description"], os.path.join(bitbake_builddir,'conf/conf-summary.txt'), os.path.join(bitbake_builddir,'conf/conf-notes.txt'),
[bitbake][wrynose][2.18][PATCH 2/2] utils: Add NFS EEXISTS/isdir failure workaround
In reply to Yoann CongalFrom: 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]
--- lib/bb/utils.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
lib/bb/utils.py +13 -1
@@ -944,8 +944,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