All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] eglibc-initial: Fix kernel headers symlink being wrong
@ 2011-11-28 22:57 Matthew McClintock
  2011-11-28 23:15 ` McClintock Matthew-B29882
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Matthew McClintock @ 2011-11-28 22:57 UTC (permalink / raw)
  To: openembedded-core

symlinks to the kernel headers were pointing at the wrong
location when being used from cache. Just copy the kernel
headers instead

Signed-off-by: Matthew McClintock <msm@freescale.com>
---
Do we need something to depend on the kernel version too since we
are copying instead of symlinking? Something like:

do_install[vardeps] += "virtual/kernel:do_populate_sysroot"

 meta/recipes-core/eglibc/eglibc-common.inc  |    2 +-
 meta/recipes-core/eglibc/eglibc-initial.inc |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/eglibc/eglibc-common.inc b/meta/recipes-core/eglibc/eglibc-common.inc
index 4fa6488..6a93968 100644
--- a/meta/recipes-core/eglibc/eglibc-common.inc
+++ b/meta/recipes-core/eglibc/eglibc-common.inc
@@ -3,7 +3,7 @@ DESCRIPTION = "Embedded GLIBC (EGLIBC) is a variant of the GNU C Library (GLIBC)
 HOMEPAGE = "http://www.eglibc.org/home"
 SECTION = "libs"
 LICENSE = "GPLv2 & LGPLv2.1"
-INC_PR = "r11"
+INC_PR = "r12"
 LIC_FILES_CHKSUM ?= "file://LICENSES;md5=07a394b26e0902b9ffdec03765209770 \
       file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
       file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
diff --git a/meta/recipes-core/eglibc/eglibc-initial.inc b/meta/recipes-core/eglibc/eglibc-initial.inc
index 448f73a..f154d64 100644
--- a/meta/recipes-core/eglibc/eglibc-initial.inc
+++ b/meta/recipes-core/eglibc/eglibc-initial.inc
@@ -48,7 +48,7 @@ do_install () {
 
 	# add links to linux-libc-headers: gcc-{cross,crossdk}-intermediate need this.
 	for t in linux asm asm-generic; do
-		ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
+		cp -ar ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
 	done
 }
 
-- 
1.7.6.1





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

* Re: [PATCH] eglibc-initial: Fix kernel headers symlink being wrong
  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   ` [PATCH] eglibc-initial: Ensure symlinks point to the correct location when built from sstate cache Richard Purdie
  2011-11-29  1:00 ` [PATCH] eglibc-initial: Fix kernel headers symlink being wrong Khem Raj
  2011-11-29 19:49 ` Khem Raj
  2 siblings, 2 replies; 11+ messages in thread
From: McClintock Matthew-B29882 @ 2011-11-28 23:15 UTC (permalink / raw)
  To: openembedded-core

On Mon, Nov 28, 2011 at 4:57 PM, Matthew McClintock <msm@freescale.com> wrote:
> symlinks to the kernel headers were pointing at the wrong
> location when being used from cache. Just copy the kernel
> headers instead
>
> Signed-off-by: Matthew McClintock <msm@freescale.com>
> ---
> Do we need something to depend on the kernel version too since we
> are copying instead of symlinking? Something like:
>
> do_install[vardeps] += "virtual/kernel:do_populate_sysroot"
>
>  meta/recipes-core/eglibc/eglibc-common.inc  |    2 +-
>  meta/recipes-core/eglibc/eglibc-initial.inc |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-core/eglibc/eglibc-common.inc b/meta/recipes-core/eglibc/eglibc-common.inc
> index 4fa6488..6a93968 100644
> --- a/meta/recipes-core/eglibc/eglibc-common.inc
> +++ b/meta/recipes-core/eglibc/eglibc-common.inc
> @@ -3,7 +3,7 @@ DESCRIPTION = "Embedded GLIBC (EGLIBC) is a variant of the GNU C Library (GLIBC)
>  HOMEPAGE = "http://www.eglibc.org/home"
>  SECTION = "libs"
>  LICENSE = "GPLv2 & LGPLv2.1"
> -INC_PR = "r11"
> +INC_PR = "r12"
>  LIC_FILES_CHKSUM ?= "file://LICENSES;md5=07a394b26e0902b9ffdec03765209770 \
>       file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
>       file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
> diff --git a/meta/recipes-core/eglibc/eglibc-initial.inc b/meta/recipes-core/eglibc/eglibc-initial.inc
> index 448f73a..f154d64 100644
> --- a/meta/recipes-core/eglibc/eglibc-initial.inc
> +++ b/meta/recipes-core/eglibc/eglibc-initial.inc
> @@ -48,7 +48,7 @@ do_install () {
>
>        # add links to linux-libc-headers: gcc-{cross,crossdk}-intermediate need this.
>        for t in linux asm asm-generic; do
> -               ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
> +               cp -ar ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/

For reference, it looked something like this when used from cache:

/home/mattsm/git/poky/build/tmp/sysroots/${MACHINE_A}-tcbootstrap/usr/include/linux:
broken symbolic link to
`../../../..//sysroots/${MACHINE_B}/usr/include/linux'

And ${MACHINE_B} did not exist...

-M



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

* Re: [PATCH] eglibc-initial: Fix kernel headers symlink being wrong
  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  1:00 ` Khem Raj
  2011-11-29 19:49 ` Khem Raj
  2 siblings, 0 replies; 11+ messages in thread
From: Khem Raj @ 2011-11-29  1:00 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, Nov 28, 2011 at 2:57 PM, Matthew McClintock <msm@freescale.com> wrote:
> symlinks to the kernel headers were pointing at the wrong
> location when being used from cache. Just copy the kernel
> headers instead
>
> Signed-off-by: Matthew McClintock <msm@freescale.com>
> ---
> Do we need something to depend on the kernel version too since we
> are copying instead of symlinking? Something like:
>
> do_install[vardeps] += "virtual/kernel:do_populate_sysroot"
>
>  meta/recipes-core/eglibc/eglibc-common.inc  |    2 +-
>  meta/recipes-core/eglibc/eglibc-initial.inc |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-core/eglibc/eglibc-common.inc b/meta/recipes-core/eglibc/eglibc-common.inc
> index 4fa6488..6a93968 100644
> --- a/meta/recipes-core/eglibc/eglibc-common.inc
> +++ b/meta/recipes-core/eglibc/eglibc-common.inc
> @@ -3,7 +3,7 @@ DESCRIPTION = "Embedded GLIBC (EGLIBC) is a variant of the GNU C Library (GLIBC)
>  HOMEPAGE = "http://www.eglibc.org/home"
>  SECTION = "libs"
>  LICENSE = "GPLv2 & LGPLv2.1"
> -INC_PR = "r11"
> +INC_PR = "r12"
>  LIC_FILES_CHKSUM ?= "file://LICENSES;md5=07a394b26e0902b9ffdec03765209770 \
>       file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
>       file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
> diff --git a/meta/recipes-core/eglibc/eglibc-initial.inc b/meta/recipes-core/eglibc/eglibc-initial.inc
> index 448f73a..f154d64 100644
> --- a/meta/recipes-core/eglibc/eglibc-initial.inc
> +++ b/meta/recipes-core/eglibc/eglibc-initial.inc
> @@ -48,7 +48,7 @@ do_install () {
>
>        # add links to linux-libc-headers: gcc-{cross,crossdk}-intermediate need this.
>        for t in linux asm asm-generic; do
> -               ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
> +               cp -ar ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
>        done
>  }


these were cross sysroot symlinks. imo copying is
the safer think to do here.

Acked-by: Khem Raj <raj.khem@gmail.com>



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

* Re: [PATCH] eglibc-initial: Fix kernel headers symlink being wrong
  2011-11-28 23:15 ` McClintock Matthew-B29882
@ 2011-11-29 12:25   ` Richard Purdie
  2011-11-29 12:26   ` [PATCH] eglibc-initial: Ensure symlinks point to the correct location when built from sstate cache Richard Purdie
  1 sibling, 0 replies; 11+ messages in thread
From: Richard Purdie @ 2011-11-29 12:25 UTC (permalink / raw)
  To: McClintock Matthew-B29882,
	Patches and discussions about the oe-core layer

On Mon, 2011-11-28 at 23:15 +0000, McClintock Matthew-B29882 wrote:
> On Mon, Nov 28, 2011 at 4:57 PM, Matthew McClintock <msm@freescale.com> wrote:
> > symlinks to the kernel headers were pointing at the wrong
> > location when being used from cache. Just copy the kernel
> > headers instead
> >
> > Signed-off-by: Matthew McClintock <msm@freescale.com>
> > ---
> > Do we need something to depend on the kernel version too since we
> > are copying instead of symlinking? Something like:
> >
> > do_install[vardeps] += "virtual/kernel:do_populate_sysroot"
> >
> >  meta/recipes-core/eglibc/eglibc-common.inc  |    2 +-
> >  meta/recipes-core/eglibc/eglibc-initial.inc |    2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta/recipes-core/eglibc/eglibc-common.inc b/meta/recipes-core/eglibc/eglibc-common.inc
> > index 4fa6488..6a93968 100644
> > --- a/meta/recipes-core/eglibc/eglibc-common.inc
> > +++ b/meta/recipes-core/eglibc/eglibc-common.inc
> > @@ -3,7 +3,7 @@ DESCRIPTION = "Embedded GLIBC (EGLIBC) is a variant of the GNU C Library (GLIBC)
> >  HOMEPAGE = "http://www.eglibc.org/home"
> >  SECTION = "libs"
> >  LICENSE = "GPLv2 & LGPLv2.1"
> > -INC_PR = "r11"
> > +INC_PR = "r12"
> >  LIC_FILES_CHKSUM ?= "file://LICENSES;md5=07a394b26e0902b9ffdec03765209770 \
> >       file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
> >       file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
> > diff --git a/meta/recipes-core/eglibc/eglibc-initial.inc b/meta/recipes-core/eglibc/eglibc-initial.inc
> > index 448f73a..f154d64 100644
> > --- a/meta/recipes-core/eglibc/eglibc-initial.inc
> > +++ b/meta/recipes-core/eglibc/eglibc-initial.inc
> > @@ -48,7 +48,7 @@ do_install () {
> >
> >        # add links to linux-libc-headers: gcc-{cross,crossdk}-intermediate need this.
> >        for t in linux asm asm-generic; do
> > -               ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
> > +               cp -ar ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
> 
> For reference, it looked something like this when used from cache:
> 
> /home/mattsm/git/poky/build/tmp/sysroots/${MACHINE_A}-tcbootstrap/usr/include/linux:
> broken symbolic link to
> `../../../..//sysroots/${MACHINE_B}/usr/include/linux'
> 
> And ${MACHINE_B} did not exist...

Yes, good catch. I'm going to propose a different fix though as the
builds take up a lot of disk space and I'd prefer not to continue to
grow the disk footprint unnecessarily.

Cheers,

Richard




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

* [PATCH] eglibc-initial: Ensure symlinks point to the correct location when built from sstate cache
  2011-11-28 23:15 ` McClintock Matthew-B29882
  2011-11-29 12:25   ` Richard Purdie
@ 2011-11-29 12:26   ` Richard Purdie
  2011-11-29 12:30     ` Martin Jansa
  2011-11-30 22:00     ` Khem Raj
  1 sibling, 2 replies; 11+ messages in thread
From: Richard Purdie @ 2011-11-29 12:26 UTC (permalink / raw)
  To: McClintock Matthew-B29882,
	Patches and discussions about the oe-core layer

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}"





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

* Re: [PATCH] eglibc-initial: Ensure symlinks point to the correct location when built from sstate cache
  2011-11-29 12:26   ` [PATCH] eglibc-initial: Ensure symlinks point to the correct location when built from sstate cache Richard Purdie
@ 2011-11-29 12:30     ` Martin Jansa
  2011-11-29 13:02       ` Richard Purdie
  2011-11-30 22:00     ` Khem Raj
  1 sibling, 1 reply; 11+ messages in thread
From: Martin Jansa @ 2011-11-29 12:30 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: McClintock Matthew-B29882

[-- Attachment #1: Type: text/plain, Size: 1825 bytes --]

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@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@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [PATCH] eglibc-initial: Ensure symlinks point to the correct location when built from sstate cache
  2011-11-29 12:30     ` Martin Jansa
@ 2011-11-29 13:02       ` Richard Purdie
  2011-11-29 17:30         ` Richard Purdie
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Purdie @ 2011-11-29 13:02 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: McClintock Matthew-B29882

On Tue, 2011-11-29 at 13:30 +0100, Martin Jansa wrote:
> 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

Its similar but not that similar. The toolchain sysroots are special in
that the bootstrap one needs to refer to the non-bootstrap one via
symlinks.

The path references you mention above should be detected by the sstate
relocation code and fixed up automatically. It sounds like the search
and replace expressions we're using aren't catching every reference we
need to which is a different problem.

Cheers,

Richard




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

* Re: [PATCH] eglibc-initial: Ensure symlinks point to the correct location when built from sstate cache
  2011-11-29 13:02       ` Richard Purdie
@ 2011-11-29 17:30         ` Richard Purdie
  0 siblings, 0 replies; 11+ messages in thread
From: Richard Purdie @ 2011-11-29 17:30 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: McClintock Matthew-B29882

On Tue, 2011-11-29 at 13:02 +0000, Richard Purdie wrote:
> On Tue, 2011-11-29 at 13:30 +0100, Martin Jansa wrote:
> > 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
> 
> Its similar but not that similar. The toolchain sysroots are special in
> that the bootstrap one needs to refer to the non-bootstrap one via
> symlinks.
> 
> The path references you mention above should be detected by the sstate
> relocation code and fixed up automatically. It sounds like the search
> and replace expressions we're using aren't catching every reference we
> need to which is a different problem.

As a hint, I think:

SSTATE_SCAN_CMD ?= "find ${SSTATE_BUILDDIR} \( -name "*.la" -o -name "*-config" \) -type f"

might need "Makefile" adding to that list of files to mangle...

Cheers,

Richard




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

* Re: [PATCH] eglibc-initial: Fix kernel headers symlink being wrong
  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  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
  2 siblings, 1 reply; 11+ messages in thread
From: Khem Raj @ 2011-11-29 19:49 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, Nov 28, 2011 at 2:57 PM, Matthew McClintock <msm@freescale.com> wrote:
> symlinks to the kernel headers were pointing at the wrong
> location when being used from cache. Just copy the kernel
> headers instead
>
> Signed-off-by: Matthew McClintock <msm@freescale.com>
> ---
> Do we need something to depend on the kernel version too since we
> are copying instead of symlinking? Something like:
>
> do_install[vardeps] += "virtual/kernel:do_populate_sysroot"
>
>  meta/recipes-core/eglibc/eglibc-common.inc  |    2 +-
>  meta/recipes-core/eglibc/eglibc-initial.inc |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-core/eglibc/eglibc-common.inc b/meta/recipes-core/eglibc/eglibc-common.inc
> index 4fa6488..6a93968 100644
> --- a/meta/recipes-core/eglibc/eglibc-common.inc
> +++ b/meta/recipes-core/eglibc/eglibc-common.inc
> @@ -3,7 +3,7 @@ DESCRIPTION = "Embedded GLIBC (EGLIBC) is a variant of the GNU C Library (GLIBC)
>  HOMEPAGE = "http://www.eglibc.org/home"
>  SECTION = "libs"
>  LICENSE = "GPLv2 & LGPLv2.1"
> -INC_PR = "r11"
> +INC_PR = "r12"
>  LIC_FILES_CHKSUM ?= "file://LICENSES;md5=07a394b26e0902b9ffdec03765209770 \
>       file://COPYING;md5=393a5ca445f6965873eca0259a17f833 \
>       file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
> diff --git a/meta/recipes-core/eglibc/eglibc-initial.inc b/meta/recipes-core/eglibc/eglibc-initial.inc
> index 448f73a..f154d64 100644
> --- a/meta/recipes-core/eglibc/eglibc-initial.inc
> +++ b/meta/recipes-core/eglibc/eglibc-initial.inc
> @@ -48,7 +48,7 @@ do_install () {
>
>        # add links to linux-libc-headers: gcc-{cross,crossdk}-intermediate need this.
>        for t in linux asm asm-generic; do
> -               ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
> +               cp -ar ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/

thinking a bit more I think just doing ln -sf might be another option
instead of doing ln -s
will avoid copying.

>        done
>  }
>
> --
> 1.7.6.1
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>



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

* Re: [PATCH] eglibc-initial: Fix kernel headers symlink being wrong
  2011-11-29 19:49 ` Khem Raj
@ 2011-11-29 20:04   ` McClintock Matthew-B29882
  0 siblings, 0 replies; 11+ messages in thread
From: McClintock Matthew-B29882 @ 2011-11-29 20:04 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, Nov 29, 2011 at 1:49 PM, Khem Raj <raj.khem@gmail.com> wrote:
>>        # add links to linux-libc-headers: gcc-{cross,crossdk}-intermediate need this.
>>        for t in linux asm asm-generic; do
>> -               ln -s ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
>> +               cp -ar ${STAGING_DIR_TARGET}${includedir}/$t ${D}${includedir}/
>
> thinking a bit more I think just doing ln -sf might be another option
> instead of doing ln -s
> will avoid copying.

Richard's new approach was sort of more along the lines of what I was
thinking. It's essentially fixing the symlinks after we deploy from
sstate-cache. I don't think (correct me if I'm wrong) this step above
will get run when deploying from sstate-cache.

-M



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

* Re: [PATCH] eglibc-initial: Ensure symlinks point to the correct location when built from sstate cache
  2011-11-29 12:26   ` [PATCH] eglibc-initial: Ensure symlinks point to the correct location when built from sstate cache Richard Purdie
  2011-11-29 12:30     ` Martin Jansa
@ 2011-11-30 22:00     ` Khem Raj
  1 sibling, 0 replies; 11+ messages in thread
From: Khem Raj @ 2011-11-30 22:00 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: McClintock Matthew-B29882

On Tue, Nov 29, 2011 at 4:26 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> 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.
>
> 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
> +}
> +

you could do ln -sf here



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

end of thread, other threads:[~2011-11-30 22:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` [PATCH] eglibc-initial: Ensure symlinks point to the correct location when built from sstate cache Richard Purdie
2011-11-29 12:30     ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.