Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: McClintock Matthew-B29882 <B29882@freescale.com>,
	Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: [PATCH] eglibc-initial: Ensure symlinks point to the correct location when built from sstate cache
Date: Tue, 29 Nov 2011 12:26:04 +0000	[thread overview]
Message-ID: <1322569564.3166.1.camel@ted> (raw)
In-Reply-To: <CAEsOVNfRuMJfh3HW-6=0ivjngv+e8Dxk7fKo_ySUSgB4EYDrLg@mail.gmail.com>

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.

Signed-off-by: Richard Purdie <richard.purdie@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}"





  parent reply	other threads:[~2011-11-29 12:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-28 22:57 [PATCH] eglibc-initial: Fix kernel headers symlink being wrong Matthew McClintock
2011-11-28 23:15 ` McClintock Matthew-B29882
2011-11-29 12:25   ` Richard Purdie
2011-11-29 12:26   ` Richard Purdie [this message]
2011-11-29 12:30     ` [PATCH] eglibc-initial: Ensure symlinks point to the correct location when built from sstate cache Martin Jansa
2011-11-29 13:02       ` Richard Purdie
2011-11-29 17:30         ` Richard Purdie
2011-11-30 22:00     ` Khem Raj
2011-11-29  1:00 ` [PATCH] eglibc-initial: Fix kernel headers symlink being wrong Khem Raj
2011-11-29 19:49 ` Khem Raj
2011-11-29 20:04   ` McClintock Matthew-B29882

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=1322569564.3166.1.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=B29882@freescale.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox