From: Adam Blank <adam.blank.g@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Adam Blank <adam.blank.g@gmail.com>
Subject: [PATCH v2 3/4] sstate: remove dead code and unify path operations
Date: Thu, 02 Apr 2026 17:39:39 +0200 [thread overview]
Message-ID: <20260402-dead_code_and_unification-v2-3-259169372299@gmail.com> (raw)
In-Reply-To: <20260402-dead_code_and_unification-v2-0-259169372299@gmail.com>
Most substring replacement operations performed on
'dirs' and 'plaindirs' are implemented in the same
pattern, except two. Unify the implementation.
Signed-off-by: Adam Blank <adam.blank.g@gmail.com>
---
meta/classes-global/sstate.bbclass | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass
index 88449d19c7..6d5ff265c5 100644
--- a/meta/classes-global/sstate.bbclass
+++ b/meta/classes-global/sstate.bbclass
@@ -333,9 +333,9 @@ def sstate_install(ss, d):
for plain in ss['plaindirs']:
workdir = d.getVar('WORKDIR')
sharedworkdir = os.path.join(d.getVar('TMPDIR'), "work-shared")
- src = sstateinst + "/" + plain.replace(workdir, '')
+ src = plain.replace(workdir, sstateinst)
if sharedworkdir in plain:
- src = sstateinst + "/" + plain.replace(sharedworkdir, '')
+ src = plain.replace(sharedworkdir, sstateinst)
dest = plain
bb.utils.mkdirhier(src)
prepdir(dest)
@@ -639,7 +639,6 @@ def sstate_package(ss, d):
for state in ss['dirs']:
if not os.path.exists(state[1]):
continue
- srcbase = state[0].rstrip("/").rsplit('/', 1)[0]
# Find and error for absolute symlinks. We could attempt to relocate but its not
# clear where the symlink is relative to in this context. We could add that markup
# to sstate tasks but there aren't many of these so better just avoid them entirely.
--
2.43.0
next prev parent reply other threads:[~2026-04-02 15:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 15:39 [PATCH v2 0/4] Slight code cleanup - remove dead code, fix typos, unify patterns Adam Blank
2026-04-02 15:39 ` [PATCH v2 1/4] lib/packagedata.py: slight improvement to code readability Adam Blank
2026-04-02 15:39 ` [PATCH v2 2/4] package_pkgdata: fix typo to stop calling undefined function Adam Blank
2026-04-03 8:00 ` [OE-core] " Mathieu Dubois-Briand
2026-04-03 10:32 ` Adam Blank
2026-04-03 11:31 ` Mathieu Dubois-Briand
2026-04-04 17:14 ` Adam Blank
2026-04-07 12:52 ` Mathieu Dubois-Briand
2026-04-12 14:18 ` Adam Blank
2026-04-16 7:03 ` Richard Purdie
2026-04-02 15:39 ` Adam Blank [this message]
2026-04-02 15:39 ` [PATCH v2 4/4] package: update the comment block explaining 'emit_pkgdata' Adam Blank
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=20260402-dead_code_and_unification-v2-3-259169372299@gmail.com \
--to=adam.blank.g@gmail.com \
--cc=openembedded-core@lists.openembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.