Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: Gentoo Dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] [PATCH] xdg-utils.eclass: don't call binaries from ROOT
Date: Wed, 03 Oct 2018 12:06:08
Message-Id: CAJ0EP424g5n_-ujQYA-V=zwR8=KPqGCPDp2LPFkcktF7wwNr6Q@mail.gmail.com
In Reply to: Re: [gentoo-dev] [PATCH] xdg-utils.eclass: don't call binaries from ROOT by James Le Cuirot
1 On Wed, Oct 3, 2018 at 5:23 AM James Le Cuirot <chewi@g.o> wrote:
2 >
3 > On Wed, 03 Oct 2018 09:33:53 +0200
4 > Michał Górny <mgorny@g.o> wrote:
5 >
6 > > On Tue, 2018-10-02 at 22:16 -0400, Mike Gilbert wrote:
7 > > > Avoid calling binaries that may have been compiled against different
8 > > > libraries or even cross-compiled for an incomatible arch.
9 > > >
10 > > > Instead, always call the binaries installed in BROOT (/), if
11 > > > available.
12 > >
13 > > Except BROOT doesn't have to be / (that's why we made it into
14 > > a variable)! Also, wouldn't it be sufficient to use PATH lookup here
15 > > and let the PM handle providing the correct root?
16 >
17 > To be clearer, EPREFIX refers to the target host, not the build host.
18 > The build host may have a different prefix and that is the point of
19 > BROOT. But as mgorny says, you should just rely on the PATH. We
20 > primarily added BROOT for cases where using the PATH wasn't viable.
21 >
22
23 My mistake, I shouldn't have used the word "BROOT" to describe the
24 root directory.
25
26 Agreed, a PATH lookup should work here.