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-01-2008, 06:37 PM
Alan Hourihane
 
Default Having a persistent bash environment variable

What's the best way to have a bash environment variable persist across
an emerge ??

I've seen the ebuild.sh which filters out bash read only variables, and
I've tried inserting mine into that list, but it doesn't seem to work.

Any help appreciated,

Thanks.

Alan.

--
gentoo-alt@lists.gentoo.org mailing list
 
Old 02-01-2008, 06:42 PM
Fabian Groffen
 
Default Having a persistent bash environment variable

On 01-02-2008 19:37:18 +0000, Alan Hourihane wrote:
> What's the best way to have a bash environment variable persist across
> an emerge ??
>
> I've seen the ebuild.sh which filters out bash read only variables, and
> I've tried inserting mine into that list, but it doesn't seem to work.

While I think this is mainly a Portage related question, still can you
explain why you want/need to do this? Or what you want to achieve?


--
Fabian Groffen
Gentoo on a different level
--
gentoo-alt@lists.gentoo.org mailing list
 
Old 02-01-2008, 07:37 PM
Alan Hourihane
 
Default Having a persistent bash environment variable

On Fri, 2008-02-01 at 20:42 +0100, Fabian Groffen wrote:
> On 01-02-2008 19:37:18 +0000, Alan Hourihane wrote:
> > What's the best way to have a bash environment variable persist across
> > an emerge ??
> >
> > I've seen the ebuild.sh which filters out bash read only variables, and
> > I've tried inserting mine into that list, but it doesn't seem to work.
>
> While I think this is mainly a Portage related question, still can you
> explain why you want/need to do this? Or what you want to achieve?

Because the libc I'm using read's an environment variable to determine
functionality, and the emerge process is removing it and changing the
way libc reacts.

Alan.

--
gentoo-alt@lists.gentoo.org mailing list
 
Old 02-01-2008, 07:58 PM
Fabian Groffen
 
Default Having a persistent bash environment variable

On 01-02-2008 20:37:23 +0000, Alan Hourihane wrote:
> On Fri, 2008-02-01 at 20:42 +0100, Fabian Groffen wrote:
> > On 01-02-2008 19:37:18 +0000, Alan Hourihane wrote:
> > > What's the best way to have a bash environment variable persist across
> > > an emerge ??
> > >
> > > I've seen the ebuild.sh which filters out bash read only variables, and
> > > I've tried inserting mine into that list, but it doesn't seem to work.
> >
> > While I think this is mainly a Portage related question, still can you
> > explain why you want/need to do this? Or what you want to achieve?
>
> Because the libc I'm using read's an environment variable to determine
> functionality, and the emerge process is removing it and changing the
> way libc reacts.

Feels like we need to know which environment variable this is and add it
to Portage's lists.


--
Fabian Groffen
Gentoo on a different level
--
gentoo-alt@lists.gentoo.org mailing list
 
Old 02-01-2008, 08:04 PM
Alan Hourihane
 
Default Having a persistent bash environment variable

On Fri, 2008-02-01 at 21:58 +0100, Fabian Groffen wrote:
> On 01-02-2008 20:37:23 +0000, Alan Hourihane wrote:
> > On Fri, 2008-02-01 at 20:42 +0100, Fabian Groffen wrote:
> > > On 01-02-2008 19:37:18 +0000, Alan Hourihane wrote:
> > > > What's the best way to have a bash environment variable persist across
> > > > an emerge ??
> > > >
> > > > I've seen the ebuild.sh which filters out bash read only variables, and
> > > > I've tried inserting mine into that list, but it doesn't seem to work.
> > >
> > > While I think this is mainly a Portage related question, still can you
> > > explain why you want/need to do this? Or what you want to achieve?
> >
> > Because the libc I'm using read's an environment variable to determine
> > functionality, and the emerge process is removing it and changing the
> > way libc reacts.
>
> Feels like we need to know which environment variable this is and add it
> to Portage's lists.

It's called UNIXMODE. But where do I add it in Portage's list ??

Alan.

--
gentoo-alt@lists.gentoo.org mailing list
 
Old 02-01-2008, 10:04 PM
Fabian Groffen
 
Default Having a persistent bash environment variable

On 01-02-2008 21:04:02 +0000, Alan Hourihane wrote:
> > > > While I think this is mainly a Portage related question, still can you
> > > > explain why you want/need to do this? Or what you want to achieve?
> > >
> > > Because the libc I'm using read's an environment variable to determine
> > > functionality, and the emerge process is removing it and changing the
> > > way libc reacts.
> >
> > Feels like we need to know which environment variable this is and add it
> > to Portage's lists.
>
> It's called UNIXMODE. But where do I add it in Portage's list ??

Can you explain how exactly you set UNIXMODE? For understanding, what
OS/libc is this, and what is the Portage version you use?

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?

Wild idea, have you tried setting UNIXMODE in etc/make.conf?


--
Fabian Groffen
Gentoo on a different level
--
gentoo-alt@lists.gentoo.org mailing list
 
Old 02-04-2008, 06:33 PM
Alan Hourihane
 
Default Having a persistent bash environment variable

On Sat, 2008-02-02 at 00:04 +0100, Fabian Groffen wrote:
> On 01-02-2008 21:04:02 +0000, Alan Hourihane wrote:
> > > > > While I think this is mainly a Portage related question, still can you
> > > > > explain why you want/need to do this? Or what you want to achieve?
> > > >
> > > > Because the libc I'm using read's an environment variable to determine
> > > > functionality, and the emerge process is removing it and changing the
> > > > way libc reacts.
> > >
> > > Feels like we need to know which environment variable this is and add it
> > > to Portage's lists.
> >
> > It's called UNIXMODE. But where do I add it in Portage's list ??
>
> Can you explain how exactly you set UNIXMODE? For understanding, what
> OS/libc is this, and what is the Portage version you use?

Actually, it's an Atari Falcon (m68k) running FreeMiNT.

> 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

> Wild idea, have you tried setting UNIXMODE in etc/make.conf?

That's one of the first things I tried, no luck.

I've got through all of the bootstrap process, and now starting emerging
the basics, but I've bumped into some more bash crashes, as I'm getting
these errors....

>>> Compiling source
in /root/gentoo/var/tmp/portage/sys-apps/sed-4.1.5/work/sed-4.1.5 ...
* The ebuild phase 'compile' has exited unexpectedly. This type of
* behavior is known to be triggered by things such as failed variable
* assignments (bug #190128) or bad substitution errors (bug #200313).

* Messages for package sys-apps/sed-4.1.5:

* The ebuild phase 'compile' has exited unexpectedly. This type of
* behavior is known to be triggered by things such as failed variable
* assignments (bug #190128) or bad substitution errors (bug #200313).

which seems to be crashing when setting host_cpu. I'll try and figure
that out.

How do I go about sending patches in to get into the tree so I don't
lose the current patches when I do an emerge --sync ??

Alan.

--
gentoo-alt@lists.gentoo.org mailing list
 
Old 02-04-2008, 06:42 PM
Fabian Groffen
 
Default Having a persistent bash environment variable

On 04-02-2008 19:33:26 +0000, Alan Hourihane wrote:
> > Can you explain how exactly you set UNIXMODE? For understanding, what
> > OS/libc is this, and what is the Portage version you use?
>
> Actually, it's an Atari Falcon (m68k) running FreeMiNT.

This makes me smile.

> > 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.

> > Wild idea, have you tried setting UNIXMODE in etc/make.conf?
>
> That's one of the first things I tried, no luck.
>
> I've got through all of the bootstrap process, and now starting emerging
> the basics, but I've bumped into some more bash crashes, as I'm getting
> these errors....
>
> >>> Compiling source
> in /root/gentoo/var/tmp/portage/sys-apps/sed-4.1.5/work/sed-4.1.5 ...
> * The ebuild phase 'compile' has exited unexpectedly. This type of
> * behavior is known to be triggered by things such as failed variable
> * assignments (bug #190128) or bad substitution errors (bug #200313).
>
> * Messages for package sys-apps/sed-4.1.5:
>
> * The ebuild phase 'compile' has exited unexpectedly. This type of
> * behavior is known to be triggered by things such as failed variable
> * assignments (bug #190128) or bad substitution errors (bug #200313).
>
> which seems to be crashing when setting host_cpu. I'll try and figure
> that out.

Hmmm, I can't help you with this for the moment, what Portage version
and what bash version are you using?

> How do I go about sending patches in to get into the tree so I don't
> lose the current patches when I do an emerge --sync ??

The tree is an svn tree, so no changes in the tree will be lost. Your
change in ebuild.sh will get lost as soon as you update portage.


--
Fabian Groffen
Gentoo on a different level
--
gentoo-alt@lists.gentoo.org mailing list
 
Old 02-04-2008, 06:48 PM
Alan Hourihane
 
Default Having a persistent bash environment variable

On Mon, 2008-02-04 at 20:42 +0100, Fabian Groffen wrote:
> On 04-02-2008 19:33:26 +0000, Alan Hourihane wrote:
> > > Can you explain how exactly you set UNIXMODE? For understanding, what
> > > OS/libc is this, and what is the Portage version you use?
> >
> > Actually, it's an Atari Falcon (m68k) running FreeMiNT.
>
> This makes me smile.

Me too.

> > > 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.

> > > Wild idea, have you tried setting UNIXMODE in etc/make.conf?
> >
> > That's one of the first things I tried, no luck.
> >
> > I've got through all of the bootstrap process, and now starting emerging
> > the basics, but I've bumped into some more bash crashes, as I'm getting
> > these errors....
> >
> > >>> Compiling source
> > in /root/gentoo/var/tmp/portage/sys-apps/sed-4.1.5/work/sed-4.1.5 ...
> > * The ebuild phase 'compile' has exited unexpectedly. This type of
> > * behavior is known to be triggered by things such as failed variable
> > * assignments (bug #190128) or bad substitution errors (bug #200313).
> >
> > * Messages for package sys-apps/sed-4.1.5:
> >
> > * The ebuild phase 'compile' has exited unexpectedly. This type of
> > * behavior is known to be triggered by things such as failed variable
> > * assignments (bug #190128) or bad substitution errors (bug #200313).
> >
> > which seems to be crashing when setting host_cpu. I'll try and figure
> > that out.
>
> Hmmm, I can't help you with this for the moment, what Portage version
> and what bash version are you using?

I'm using portage-prefix 9233 currently with bash 3.2(0) and tried
3.2(33), although I believe anything higher than (20) triggers the usual
problems.

> > How do I go about sending patches in to get into the tree so I don't
> > lose the current patches when I do an emerge --sync ??
>
> The tree is an svn tree, so no changes in the tree will be lost. Your
> change in ebuild.sh will get lost as soon as you update portage.

O.k. I can deal with the ebuild.sh modification for now until we get a
more definitive answer.

What about changes to the bootstrap-prefix.sh ?

Alan.

--
gentoo-alt@lists.gentoo.org mailing list
 
Old 02-04-2008, 07:45 PM
Fabian Groffen
 
Default Having a persistent bash environment variable

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/.

> I'm using portage-prefix 9233 currently with bash 3.2(0) and tried
> 3.2(33), although I believe anything higher than (20) triggers the usual
> problems.

Those versions should be ok, I think...

> > > How do I go about sending patches in to get into the tree so I don't
> > > lose the current patches when I do an emerge --sync ??
> >
> > The tree is an svn tree, so no changes in the tree will be lost. Your
> > change in ebuild.sh will get lost as soon as you update portage.
>
> O.k. I can deal with the ebuild.sh modification for now until we get a
> more definitive answer.
>
> What about changes to the bootstrap-prefix.sh ?

It is also in the svn tree, so also there svn will retain your changes.


--
Fabian Groffen
Gentoo on a different level
--
gentoo-alt@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 03:29 AM.

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