[OE-core] [PATCH] bitbake.conf/sstate.bbclass: Change PATH when installing sstate files to avoid issues

McClintock Matthew-B29882 B29882 at freescale.com
Wed Mar 21 17:54:55 UTC 2012


On Wed, Mar 21, 2012 at 5:44 AM, Richard Purdie
<richard.purdie at linuxfoundation.org> wrote:
> This resolves issues related to pigz-native when installing from sstate that people
> have been seeing. It also gives us a way to solve issues like the gzip-native race
> during sstate package creation covered in Yocto #1774.
>
> Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> ---
> diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
> index 0d16d11..1570654 100644
> --- a/meta/classes/sstate.bbclass
> +++ b/meta/classes/sstate.bbclass
> @@ -153,6 +153,12 @@ def sstate_installpkg(ss, d):
>         bb.mkdirhier(dir)
>         oe.path.remove(dir)
>
> +    # We're adding binaries into the sysroots, we don't want to execute them
> +    # whilst they're half installed or being installed so we need to
> +    # remove the sysroots from PATH
> +    savedpath = d.getVar("PATH")
> +    d.setVar("PATH", "${ORIGPATH}")
> +
>     sstateinst = d.expand("${WORKDIR}/sstate-install-%s/" % ss['name'])
>     sstatepkg = d.getVar('SSTATE_PKG', True) + '_' + ss['name'] + ".tgz"
>
> @@ -190,6 +196,8 @@ def sstate_installpkg(ss, d):
>         # conflict with another writer
>         os.remove(fixmefn)
>
> +    d.setVar("PATH", savedpath)
> +

So we always use the host tar and gzip here? Isn't there a reason we
build tar-native explicitly? Could be fine if it's not needed for
sstate-cache...

>     for state in ss['dirs']:
>         prepdir(state[1])
>         os.rename(sstateinst + state[0], state[1])
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index d4357d1..145a9a2 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -401,6 +401,7 @@ EXTRA_IMAGEDEPENDS = ""
>  # Toolchain info.
>  ##################################################################
>
> +ORIGPATH := "${PATH}"
>  PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}:${STAGING_BINDIR_CROSS}:${STAGING_DIR_NATIVE}${sbindir_native}:${STAGING_BINDIR_NATIVE}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}/${base_bindir_native}:"
>  export PATH
>
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




More information about the Openembedded-core mailing list