* [gentoo-user] How to Set Environment Variables in Ebuilds
@ 2014-01-14 3:27 Masanori Ogino
2014-01-14 19:03 ` Mike Gilbert
0 siblings, 1 reply; 3+ messages in thread
From: Masanori Ogino @ 2014-01-14 3:27 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 541 bytes --]
Hello.
I wrote an ebuild and it executes a small Python script bundled in the
source. The Python script requires a environment variable to be set.
I tried something like:
NAME=value ${ECONF_SOURCE:-.}/script_file.py
and
export NAME=value
${ECONF_SOURCE:-.}/script_file.py
but the both fail to pass the parameter via the environment variable to the
script.
How can I do it? Please point it out if I overlooked something.
--
Masanori Ogino <masanori.ogino@gmail.com>
http://twitter.com/omasanori
http://gplus.to/omasanori
[-- Attachment #2: Type: text/html, Size: 938 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-user] How to Set Environment Variables in Ebuilds
2014-01-14 3:27 [gentoo-user] How to Set Environment Variables in Ebuilds Masanori Ogino
@ 2014-01-14 19:03 ` Mike Gilbert
2014-01-14 21:36 ` Masanori Ogino
0 siblings, 1 reply; 3+ messages in thread
From: Mike Gilbert @ 2014-01-14 19:03 UTC (permalink / raw
To: gentoo-user
On Mon, Jan 13, 2014 at 10:27 PM, Masanori Ogino
<masanori.ogino@gmail.com> wrote:
> Hello.
>
> I wrote an ebuild and it executes a small Python script bundled in the
> source. The Python script requires a environment variable to be set.
>
> I tried something like:
>
> NAME=value ${ECONF_SOURCE:-.}/script_file.py
>
> and
>
> export NAME=value
> ${ECONF_SOURCE:-.}/script_file.py
>
> but the both fail to pass the parameter via the environment variable to the
> script.
>
> How can I do it? Please point it out if I overlooked something.
>
Either of the method you listed about should work.
Are you sure the script is looking for an environment variable?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-user] How to Set Environment Variables in Ebuilds
2014-01-14 19:03 ` Mike Gilbert
@ 2014-01-14 21:36 ` Masanori Ogino
0 siblings, 0 replies; 3+ messages in thread
From: Masanori Ogino @ 2014-01-14 21:36 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]
Ahh, well, I understand my mistake now.
Actually I want to pass ${ECONF_SOURCE}, and the variable could be empty,
so NAME="${ECONF_SOURCE}" might be expanded to NAME=, so the environment
variable is unset. That's why I've seen a 'missing environment variable'
error from the script.
Thank you for your advice, and I'm sorry to post such question.
2014/1/15 Mike Gilbert <floppym@gentoo.org>
> On Mon, Jan 13, 2014 at 10:27 PM, Masanori Ogino
> <masanori.ogino@gmail.com> wrote:
> > Hello.
> >
> > I wrote an ebuild and it executes a small Python script bundled in the
> > source. The Python script requires a environment variable to be set.
> >
> > I tried something like:
> >
> > NAME=value ${ECONF_SOURCE:-.}/script_file.py
> >
> > and
> >
> > export NAME=value
> > ${ECONF_SOURCE:-.}/script_file.py
> >
> > but the both fail to pass the parameter via the environment variable to
> the
> > script.
> >
> > How can I do it? Please point it out if I overlooked something.
> >
>
> Either of the method you listed about should work.
>
> Are you sure the script is looking for an environment variable?
>
>
--
Masanori Ogino <masanori.ogino@gmail.com>
http://twitter.com/omasanori
http://gplus.to/omasanori
[-- Attachment #2: Type: text/html, Size: 2008 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-14 21:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-14 3:27 [gentoo-user] How to Set Environment Variables in Ebuilds Masanori Ogino
2014-01-14 19:03 ` Mike Gilbert
2014-01-14 21:36 ` Masanori Ogino
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox