1 |
-----Mike Frysinger <vapier@g.o> wrote: ----- |
2 |
|
3 |
======================= |
4 |
To: gentoo-embedded@l.g.o |
5 |
From: Mike Frysinger <vapier@g.o> |
6 |
Date: 23/12/2013 4:05 |
7 |
Cc: Joakim Tjernlund <Joakim.Tjernlund@×××××××××.se> |
8 |
Subject: Re: [gentoo-embedded] [PATCH 2/2] Add SYSROOT definition in ${SYSROOT}/etc/profile.env |
9 |
======================= |
10 |
On Tuesday 10 December 2013 11:33:43 Joakim Tjernlund wrote: |
11 |
> env. variables in profile.env are expanded in make.conf so |
12 |
> one can use ROOT=${SYSROOT} |
13 |
> --- |
14 |
> wrappers/emerge-wrapper | 5 +++++ |
15 |
> 1 file changed, 5 insertions(+) |
16 |
> |
17 |
> diff --git a/wrappers/emerge-wrapper b/wrappers/emerge-wrapper |
18 |
> index be81f95..bc6328d 100755 |
19 |
> --- a/wrappers/emerge-wrapper |
20 |
> +++ b/wrappers/emerge-wrapper |
21 |
> @@ -36,6 +36,11 @@ cross_wrap_etc() |
22 |
> |
23 |
> cp -a "${PREFIX}"/share/crossdev/etc ${SYSROOT}/ || return 1 |
24 |
> |
25 |
> + mkdir -p ${SYSROOT}/etc/env.d |
26 |
> + echo "SYSROOT=${SYSROOT}" > ${SYSROOT}/etc/env.d/01sysroot |
27 |
> + #Generate ${SYSROOT}/etc/profile.env |
28 |
> + ROOT=${SYSROOT}/ env-update --no-ldconfig |
29 |
> + |
30 |
> local conf=${SYSROOT}/etc/portage/make.conf |
31 |
> |
32 |
> # Re-use existing CHOST->portage ARCH mapping code |
33 |
|
34 |
i don't see how this would help. portage doesn't load shell env files from |
35 |
$SYSROOT, so making it available in that wouldn't help. |
36 |
-mike |
37 |
|
38 |
|
39 |
True, I figured it would load profile.env from PORTAGE_CONFIGROOT but later found that portage uses eroot for that, |
40 |
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, |
41 |
I do not have that bug handy. |
42 |
As a workaround one have to set ROOT to configroot too. |
43 |
|
44 |
On anoter note(dont know if I mentioned this already) but ARCH and ELIBC should be defined within the profile as |
45 |
these are profile only vars. Just create a profile dir inside configroot/etc/portage and add a file which defines them. |
46 |
|
47 |
Sorry for beeing a bit vauge but that is what I can do ATM as I am traveling the next 2 weeks. |
48 |
|
49 |
Jocke |
50 |
[attachment(s) signature.asc removed by Joakim Tjernlund/Transmode] |