FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Alt

 
 
LinkBack Thread Tools
 
Old 02-04-2008, 07:56 PM
Alan Hourihane
 
Default Having a persistent bash environment variable

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
 
Old 02-08-2008, 08:14 AM
Fabian Groffen
 
Default 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
 
Old 02-08-2008, 09:16 AM
Alan Hourihane
 
Default 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.

Right. Thanks Fabian.

Alan.

--
gentoo-alt@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 07:14 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org