Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] FIXMESTAGINGDIRHOST is not getting restored properly for all recipes
@ 2026-07-23 21:52 Shramana Chakraborty
  2026-07-23 22:01 ` Patchtest results for " patchtest
  2026-07-24  9:52 ` [OE-core] " Alexander Kanavin
  0 siblings, 2 replies; 3+ messages in thread
From: Shramana Chakraborty @ 2026-07-23 21:52 UTC (permalink / raw)
  To: openembedded-core; +Cc: Shramana Chakraborty

Expectation is sstate_hardcode_path_unpack will perform the exact reverse
operation of sstate_hardcode_path.
But FIXMESTAGINGDIRHOST is not getting restored properly when the artifacts
are fetched from shared state for recipes which requires both host and
target to be restored. This was introduced by 0875107.

Fix the unpack logic. There are effectively two cases, native and
cross-canadian require only host and everything else require both host
and target.

Signed-off-by: Shramana Chakraborty <shrchakr@cisco.com>
---
 meta/classes-global/sstate.bbclass | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/meta/classes-global/sstate.bbclass b/meta/classes-global/sstate.bbclass
index 34a59fda00..9d62855bc0 100644
--- a/meta/classes-global/sstate.bbclass
+++ b/meta/classes-global/sstate.bbclass
@@ -420,10 +420,8 @@ python sstate_hardcode_path_unpack () {
 
         if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross-canadian', d):
             sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRHOST:%s:g'" % (staging_host)
-        elif bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d):
-            sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g; s:FIXMESTAGINGDIRHOST:%s:g'" % (staging_target, staging_host)
         else:
-            sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g'" % (staging_target)
+            sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g; s:FIXMESTAGINGDIRHOST:%s:g'" % (staging_target, staging_host)
 
         extra_staging_fixmes = d.getVar('EXTRA_STAGING_FIXMES') or ''
         for fixmevar in extra_staging_fixmes.split():
@@ -581,7 +579,7 @@ python sstate_hardcode_path () {
     # staging packages.
     #
     # Note: the logic in this function needs to match the reverse logic
-    # in sstate_installpkg(ss, d)
+    # in sstate_hardcode_path_unpack(d)
 
     staging_target = d.getVar('RECIPE_SYSROOT')
     staging_host = d.getVar('RECIPE_SYSROOT_NATIVE')
@@ -590,9 +588,6 @@ python sstate_hardcode_path () {
     sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % staging_host
     if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross-canadian', d):
         sstate_grep_cmd = "grep -l -e '%s'" % (staging_host)
-    elif bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d):
-        sstate_grep_cmd = "grep -l -e '%s' -e '%s'" % (staging_target, staging_host)
-        sstate_sed_cmd += " -e 's:%s:FIXMESTAGINGDIRTARGET:g'" % staging_target
     else:
         sstate_grep_cmd = "grep -l -e '%s' -e '%s'" % (staging_target, staging_host)
         sstate_sed_cmd += " -e 's:%s:FIXMESTAGINGDIRTARGET:g'" % staging_target


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-24  9:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23 21:52 [PATCH] FIXMESTAGINGDIRHOST is not getting restored properly for all recipes Shramana Chakraborty
2026-07-23 22:01 ` Patchtest results for " patchtest
2026-07-24  9:52 ` [OE-core] " Alexander Kanavin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox