public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] emerge with another PATH
@ 2022-05-20 13:55 karl
  2022-05-20 14:28 ` Neil Bothwick
  0 siblings, 1 reply; 6+ messages in thread
From: karl @ 2022-05-20 13:55 UTC (permalink / raw
  To: gentoo-user

How do I run emerge so that when buildin/emerging the package another
PATH is used ?

Regards,
/Karl Hammar



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] emerge with another PATH
  2022-05-20 13:55 [gentoo-user] emerge with another PATH karl
@ 2022-05-20 14:28 ` Neil Bothwick
  2022-05-20 15:22   ` karl
  0 siblings, 1 reply; 6+ messages in thread
From: Neil Bothwick @ 2022-05-20 14:28 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 482 bytes --]

On Fri, 20 May 2022 15:55:22 +0200 (CEST), karl@aspodata.se wrote:

> How do I run emerge so that when buildin/emerging the package another
> PATH is used ?

PATH is just an environment variable, so

PATH="/path1:/path2" emerge blah

should do that.

Unless what you are really asking is how do you get emerge to install
files to a different location. In that case look at the --root option in
man emerge.


-- 
Neil Bothwick

Is there another word for synonym?

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] emerge with another PATH
  2022-05-20 14:28 ` Neil Bothwick
@ 2022-05-20 15:22   ` karl
  2022-05-20 15:35     ` tastytea
  2022-05-20 15:43     ` Dale
  0 siblings, 2 replies; 6+ messages in thread
From: karl @ 2022-05-20 15:22 UTC (permalink / raw
  To: gentoo-user

Neil Bothwick:
> On Fri, 20 May 2022 15:55:22 +0200 (CEST), karl@aspodata.se wrote:
> > How do I run emerge so that when buildin/emerging the package another
> > PATH is used ?
> 
> PATH is just an environment variable, so
> 
> PATH="/path1:/path2" emerge blah
> 
> should do that.

Doesn't seems to work...

# echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/texlive/2022/bin/x86_64-linux
# emerge -aqvu  app-text/dblatex 
...
# grep ^Err /Net/gentoo/tmpdir/portage/app-text/dblatex-0.3.11-r1/temp/build.log 
Error: not found: latex, makeindex, pdflatex, kpsewhich
# which latex
/usr/local/texlive/2022/bin/x86_64-linux/latex
#

Something seems to set its own PATH.

Regards,
/Karl Hammar



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] emerge with another PATH
  2022-05-20 15:22   ` karl
@ 2022-05-20 15:35     ` tastytea
  2022-05-20 15:49       ` karl
  2022-05-20 15:43     ` Dale
  1 sibling, 1 reply; 6+ messages in thread
From: tastytea @ 2022-05-20 15:35 UTC (permalink / raw
  To: gentoo-user

On 2022-05-20 17:22+0200 karl@aspodata.se wrote:

> Neil Bothwick:
> > On Fri, 20 May 2022 15:55:22 +0200 (CEST), karl@aspodata.se wrote:  
> > > How do I run emerge so that when buildin/emerging the package
> > > another PATH is used ?  
> > 
> > PATH is just an environment variable, so
> > 
> > PATH="/path1:/path2" emerge blah
> > 
> > should do that.  
> 
> Doesn't seems to work...
> 
> # echo $PATH
> /usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/texlive/2022/bin/x86_64-linux
> # emerge -aqvu  app-text/dblatex 
> ...
> # grep ^Err
> /Net/gentoo/tmpdir/portage/app-text/dblatex-0.3.11-r1/temp/build.log
> Error: not found: latex, makeindex, pdflatex, kpsewhich # which latex
> /usr/local/texlive/2022/bin/x86_64-linux/latex
> #
> 
> Something seems to set its own PATH.
> 
> Regards,
> /Karl Hammar

It probably reinitialises PATH when dropping to the portage user? Try
modifying PATH in /etc/portage/bashrc — note that this file is sourced
multiple times during the build, see
<https://wiki.gentoo.org/wiki//etc/portage/bashrc>.

Kind regards, tastytea


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] emerge with another PATH
  2022-05-20 15:22   ` karl
  2022-05-20 15:35     ` tastytea
@ 2022-05-20 15:43     ` Dale
  1 sibling, 0 replies; 6+ messages in thread
From: Dale @ 2022-05-20 15:43 UTC (permalink / raw
  To: gentoo-user

karl@aspodata.se wrote:
> Neil Bothwick:
>> On Fri, 20 May 2022 15:55:22 +0200 (CEST), karl@aspodata.se wrote:
>>> How do I run emerge so that when buildin/emerging the package another
>>> PATH is used ?
>> PATH is just an environment variable, so
>>
>> PATH="/path1:/path2" emerge blah
>>
>> should do that.
> Doesn't seems to work...
>
> # echo $PATH
> /usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/texlive/2022/bin/x86_64-linux
> # emerge -aqvu  app-text/dblatex 
> ...
> # grep ^Err /Net/gentoo/tmpdir/portage/app-text/dblatex-0.3.11-r1/temp/build.log 
> Error: not found: latex, makeindex, pdflatex, kpsewhich
> # which latex
> /usr/local/texlive/2022/bin/x86_64-linux/latex
> #
>
> Something seems to set its own PATH.
>
> Regards,
> /Karl Hammar
>
>
>

From man emerge:

ENVIRONMENT OPTIONS

ROOT = [path]
Use ROOT to specify the target root filesystem to be used for merging
the requested packages or ebuilds and their runtime dependencies. This
variable can be set via the --root option or in make.conf(5) (the
command line overrides other settings).
Defaults to /.

--root=DIR
Set the ROOT environment variable.

That variable is either set in make.conf or on the emerge command line
as a option.  Of course, this depends on what it is you are trying to
accomplish.  More info on that may help others to know what settings
need to be adjusted. 

Hope that helps.

Dale

:-)  :-) 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] emerge with another PATH
  2022-05-20 15:35     ` tastytea
@ 2022-05-20 15:49       ` karl
  0 siblings, 0 replies; 6+ messages in thread
From: karl @ 2022-05-20 15:49 UTC (permalink / raw
  To: gentoo-user

tastytea:
> On 2022-05-20 17:22+0200 karl@aspodata.se wrote:
> 
> > Neil Bothwick:
> > > On Fri, 20 May 2022 15:55:22 +0200 (CEST), karl@aspodata.se wrote:  
> > > > How do I run emerge so that when buildin/emerging the package
> > > > another PATH is used ?  
> > > 
> > > PATH is just an environment variable, so
> > > 
> > > PATH="/path1:/path2" emerge blah
> > > 
> > > should do that.  
> > 
> > Doesn't seems to work...
...
> It probably reinitialises PATH when dropping to the portage user? Try
> modifying PATH in /etc/portage/bashrc — note that this file is sourced
> multiple times during the build, see
> <https://wiki.gentoo.org/wiki//etc/portage/bashrc>.

Thanks, that solved it.

Regards,
/Karl Hammar



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-20 15:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-20 13:55 [gentoo-user] emerge with another PATH karl
2022-05-20 14:28 ` Neil Bothwick
2022-05-20 15:22   ` karl
2022-05-20 15:35     ` tastytea
2022-05-20 15:49       ` karl
2022-05-20 15:43     ` Dale

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox