[OE-core] [PATCH] eglibc-initial: Ensure symlinks point to the correct location when built from sstate cache

Martin Jansa martin.jansa at gmail.com
Tue Nov 29 12:30:27 UTC 2011


On Tue, Nov 29, 2011 at 12:26:04PM +0000, Richard Purdie wrote:
> If the sstate files are installed into a sysroot from the sstate cache,
> the directory to the main sysroot can change and the symlinks aren't
> adjusted to account for this. This is a problem specific to the toolchain
> bootstrap process. This patch adds up a function to recreate the
> symlinks, hence ensuring they always point at the correct location.

Similar issue is IMHO in python and apr (and probably more)
http://lists.linuxtogo.org/pipermail/openembedded-core/2011-November/012149.html

Cheers,

> Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> ---
> diff --git a/meta/recipes-core/eglibc/eglibc-initial.inc b/meta/recipes-core/eglibc/eglibc-initial.inc
> index 448f73a..9062516 100644
> --- a/meta/recipes-core/eglibc/eglibc-initial.inc
> +++ b/meta/recipes-core/eglibc/eglibc-initial.inc
> @@ -60,4 +60,16 @@ do_siteconfig () {
>  	:
>  }
>  
> +SSTATEPOSTINSTFUNCS += "eglibcinitial_sstate_postinst"
> +eglibcinitial_sstate_postinst() {
> +	if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
> +	then
> +		# Recreate the symlinks to ensure they point to the correct location
> +		for t in linux asm asm-generic; do
> +			rm -f ${STAGING_DIR_TCBOOTSTRAP}${includedir}/$t
> +			ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${STAGING_DIR_TCBOOTSTRAP}${includedir}/
> +		done
> +	fi
> +}
> +
>  do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}"
> 
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20111129/1c231ff8/attachment-0002.sig>


More information about the Openembedded-core mailing list