Gentoo Archives: gentoo-alt

From: Fabian Groffen <grobian@g.o>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] Having a persistent bash environment variable
Date: Fri, 08 Feb 2008 09:14:58
Message-Id: 20080208091454.GG1750@gentoo.org
In Reply to: Re: [gentoo-alt] Having a persistent bash environment variable by Alan Hourihane
1 On 04-02-2008 20:56:21 +0000, Alan Hourihane wrote:
2 > > Then run portage, and check if the var is set. Also, during
3 > > compilation, it should be stored in the environment file in the "temp"
4 > > dir of your var/tmp/portage/cat/pkg/.
5 >
6 > O.k. it is there on the echo, but something is removing it in the
7 > ebuild.sh script as it's failed again. I'm pretty sure it's the
8 > filter_readonly_variables() doing it, then it puts it back when it
9 > sources the environment later.
10 >
11 > But that's too late, because if UNIXMODE is removed I lose, and sed
12 > breaks.
13
14 It appears that the sed that fails for you is a sed that is run in the
15 middle of the process to filter the environment, just after the env is
16 cleaned, and just before the env is restored.
17
18 In your case it is necessary to inject UNIXMODE in ebuild.sh as you did,
19 the ebuild should in any case always see UNIXMODE as you set it in your
20 environment.
21
22 The only thing I can do, is to make a special file that is sourced by
23 Portage in ebuild.sh that contains UNIXMODE for you. It is quite ugly,
24 but the only thing that will help you to keep a working Portage over
25 upgrades.
26
27
28 --
29 Fabian Groffen
30 Gentoo on a different level
31 --
32 gentoo-alt@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-alt] Having a persistent bash environment variable Alan Hourihane <alanh@×××××××××××××××××.uk>