Mailing List Archive

[PATCH 2/2] Add SYSROOT definition in ${SYSROOT}/etc/profile.env
env. variables in profile.env are expanded in make.conf so
one can use ROOT=${SYSROOT}
---
wrappers/emerge-wrapper | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
index be81f95..bc6328d 100755
--- a/wrappers/emerge-wrapper
+++ b/wrappers/emerge-wrapper
@@ -36,6 +36,11 @@ cross_wrap_etc()

cp -a "${PREFIX}"/share/crossdev/etc ${SYSROOT}/ || return 1

+ mkdir -p ${SYSROOT}/etc/env.d
+ echo "SYSROOT=${SYSROOT}" > ${SYSROOT}/etc/env.d/01sysroot
+ #Generate ${SYSROOT}/etc/profile.env
+ ROOT=${SYSROOT}/ env-update --no-ldconfig
+
local conf=${SYSROOT}/etc/portage/make.conf

# Re-use existing CHOST->portage ARCH mapping code
--
1.8.3.2
Re: [PATCH 2/2] Add SYSROOT definition in ${SYSROOT}/etc/profile.env [ In reply to ]
On Tuesday 10 December 2013 11:33:43 Joakim Tjernlund wrote:
> env. variables in profile.env are expanded in make.conf so
> one can use ROOT=${SYSROOT}
> ---
> wrappers/emerge-wrapper | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
> index be81f95..bc6328d 100755
> --- a/wrappers/emerge-wrapper
> +++ b/wrappers/emerge-wrapper
> @@ -36,6 +36,11 @@ cross_wrap_etc()
>
> cp -a "${PREFIX}"/share/crossdev/etc ${SYSROOT}/ || return 1
>
> + mkdir -p ${SYSROOT}/etc/env.d
> + echo "SYSROOT=${SYSROOT}" > ${SYSROOT}/etc/env.d/01sysroot
> + #Generate ${SYSROOT}/etc/profile.env
> + ROOT=${SYSROOT}/ env-update --no-ldconfig
> +
> local conf=${SYSROOT}/etc/portage/make.conf
>
> # Re-use existing CHOST->portage ARCH mapping code

i don't see how this would help. portage doesn't load shell env files from
$SYSROOT, so making it available in that wouldn't help.
-mike
Re: [PATCH 2/2] Add SYSROOT definition in ${SYSROOT}/etc/profile.env [ In reply to ]
-----Mike Frysinger <vapier@gentoo.org> wrote: -----

=======================
To: gentoo-embedded@lists.gentoo.org
From: Mike Frysinger <vapier@gentoo.org>
Date: 23/12/2013 4:05
Cc: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Subject: Re: [gentoo-embedded] [PATCH 2/2] Add SYSROOT definition in ${SYSROOT}/etc/profile.env
=======================
On Tuesday 10 December 2013 11:33:43 Joakim Tjernlund wrote:
> env. variables in profile.env are expanded in make.conf so
> one can use ROOT=${SYSROOT}
> ---
> wrappers/emerge-wrapper | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper
> index be81f95..bc6328d 100755
> --- a/wrappers/emerge-wrapper
> +++ b/wrappers/emerge-wrapper
> @@ -36,6 +36,11 @@ cross_wrap_etc()
>
> cp -a "${PREFIX}"/share/crossdev/etc ${SYSROOT}/ || return 1
>
> + mkdir -p ${SYSROOT}/etc/env.d
> + echo "SYSROOT=${SYSROOT}" > ${SYSROOT}/etc/env.d/01sysroot
> + #Generate ${SYSROOT}/etc/profile.env
> + ROOT=${SYSROOT}/ env-update --no-ldconfig
> +
> local conf=${SYSROOT}/etc/portage/make.conf
>
> # Re-use existing CHOST->portage ARCH mapping code

i don't see how this would help. portage doesn't load shell env files from
$SYSROOT, so making it available in that wouldn't help.
-mike


True, I figured it would load profile.env from PORTAGE_CONFIGROOT but later found that portage uses eroot for that,
Feels like a bug to me, all config should come from configroot I think. I have mentioned this in a bug but as I am on vacation now,
I do not have that bug handy.
As a workaround one have to set ROOT to configroot too.

On anoter note(dont know if I mentioned this already) but ARCH and ELIBC should be defined within the profile as
these are profile only vars. Just create a profile dir inside configroot/etc/portage and add a file which defines them.

Sorry for beeing a bit vauge but that is what I can do ATM as I am traveling the next 2 weeks.

Jocke
[attachment(s) signature.asc removed by Joakim Tjernlund/Transmode]