On Mon, 2008-02-04 at 21:45 +0100, Fabian Groffen wrote:
> On 04-02-2008 19:48:28 +0000, Alan Hourihane wrote:
> > > > > Do I understand correctly if I say that you set UNIXMODE in your
> > > > > environment, call portage and that you find that the
> > > > > compilation/installation doesn't seem to have UNIXMODE set?
> > > >
> > > > Yes. I've fixed this currently with adding
> > > >
> > > > export UNIXMODE=....
> > > >
> > > > at the top of ebuild.sh
> > >
> > > Ok, that's a crude hack, I'll ask around to see how we can do this
> > > properly.
> >
> > Right, please do, I'd love to hear the correct solution.
>
> Could you add the following to your etc/portage/bashrc:
>
> echo EBUILD_PHASE=${EBUILD_PHASE} UNIXMODE=${UNIXMODE}
>
> Remove your hack and set UNIXMODE in etc/make.conf
>
> Then run portage, and check if the var is set. Also, during
> compilation, it should be stored in the environment file in the "temp"
> dir of your var/tmp/portage/cat/pkg/.
O.k. it is there on the echo, but something is removing it in the
ebuild.sh script as it's failed again. I'm pretty sure it's the
filter_readonly_variables() doing it, then it puts it back when it
sources the environment later.
But that's too late, because if UNIXMODE is removed I lose, and sed
breaks.
Alan.
--
gentoo-alt@lists.gentoo.org mailing list
02-08-2008, 08:14 AM
Fabian Groffen
Having a persistent bash environment variable
On 04-02-2008 20:56:21 +0000, Alan Hourihane wrote:
> > Then run portage, and check if the var is set. Also, during
> > compilation, it should be stored in the environment file in the "temp"
> > dir of your var/tmp/portage/cat/pkg/.
>
> O.k. it is there on the echo, but something is removing it in the
> ebuild.sh script as it's failed again. I'm pretty sure it's the
> filter_readonly_variables() doing it, then it puts it back when it
> sources the environment later.
>
> But that's too late, because if UNIXMODE is removed I lose, and sed
> breaks.
It appears that the sed that fails for you is a sed that is run in the
middle of the process to filter the environment, just after the env is
cleaned, and just before the env is restored.
In your case it is necessary to inject UNIXMODE in ebuild.sh as you did,
the ebuild should in any case always see UNIXMODE as you set it in your
environment.
The only thing I can do, is to make a special file that is sourced by
Portage in ebuild.sh that contains UNIXMODE for you. It is quite ugly,
but the only thing that will help you to keep a working Portage over
upgrades.
--
Fabian Groffen
Gentoo on a different level
--
gentoo-alt@lists.gentoo.org mailing list
02-08-2008, 09:16 AM
Alan Hourihane
Having a persistent bash environment variable
On Fri, 2008-02-08 at 10:14 +0100, Fabian Groffen wrote:
> On 04-02-2008 20:56:21 +0000, Alan Hourihane wrote:
> > > Then run portage, and check if the var is set. Also, during
> > > compilation, it should be stored in the environment file in the "temp"
> > > dir of your var/tmp/portage/cat/pkg/.
> >
> > O.k. it is there on the echo, but something is removing it in the
> > ebuild.sh script as it's failed again. I'm pretty sure it's the
> > filter_readonly_variables() doing it, then it puts it back when it
> > sources the environment later.
> >
> > But that's too late, because if UNIXMODE is removed I lose, and sed
> > breaks.
>
> It appears that the sed that fails for you is a sed that is run in the
> middle of the process to filter the environment, just after the env is
> cleaned, and just before the env is restored.
>
> In your case it is necessary to inject UNIXMODE in ebuild.sh as you did,
> the ebuild should in any case always see UNIXMODE as you set it in your
> environment.
>
> The only thing I can do, is to make a special file that is sourced by
> Portage in ebuild.sh that contains UNIXMODE for you. It is quite ugly,
> but the only thing that will help you to keep a working Portage over
> upgrades.