public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Michael Arndt <michael@rndt.dev>
To: openembedded-core@lists.openembedded.org
Cc: Michael Arndt <michael@rndt.dev>,
	Richard Purdie <richard.purdie@linuxfoundation.org>
Subject: [PATCH] sstate: Fail on file systems without hard link support
Date: Fri, 17 Apr 2026 22:07:09 +0200	[thread overview]
Message-ID: <20260417200709.96501-1-michael@rndt.dev> (raw)

The sstate can only work reliably when the file system has support for hard
links. Previously this error was silenced, now the build fails and the user is
informed about the problem.

Signed-off-by: Michael Arndt <michael@rndt.dev>
CC: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes-global/sstate.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass
index 88449d19c7..1d41d9bc20 100644
--- a/meta/classes-global/sstate.bbclass
+++ b/meta/classes-global/sstate.bbclass
@@ -787,6 +787,7 @@ sstate_task_postfunc[dirs] = "${WORKDIR}"
 # and renamed in place once created.
 python sstate_create_and_sign_package () {
     from pathlib import Path
+    import errno
 
     # Best effort touch
     def touch(file):
@@ -806,6 +807,9 @@ python sstate_create_and_sign_package () {
             else:
                 os.link(src, dst)
             return True
+        except OSError as e:
+            if e.errno == errno.ENOSYS:
+                bb.fatal("sstate is only supported on file systems with hard link support: %s" % e)
         except:
             pass
 


                 reply	other threads:[~2026-04-17 20:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260417200709.96501-1-michael@rndt.dev \
    --to=michael@rndt.dev \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox