Can you please provide a reproducible example where this is not
working properly?

Alex

On Thu, 23 Jul 2026 at 23:52, Shramana Chakraborty via
lists.openembedded.org <[email protected]>
wrote:
>
> 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 <[email protected]>
> ---
>  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
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#241925): 
https://lists.openembedded.org/g/openembedded-core/message/241925
Mute This Topic: https://lists.openembedded.org/mt/120418060/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to