Gentoo Archives: gentoo-dev

From: James Le Cuirot <chewi@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PMS] [PATCH] Correct the definition of ESYSROOT as EPREFIX isn't always applicable
Date: Tue, 30 Jul 2019 22:26:43
Message-Id: 20190730232627.4c719467@symphony.aura-online.co.uk
In Reply to: Re: [gentoo-dev] [PMS] [PATCH] Correct the definition of ESYSROOT as EPREFIX isn't always applicable by Alexis Ballier
1 On Mon, 29 Jul 2019 14:05:10 +0200
2 Alexis Ballier <aballier@g.o> wrote:
3
4 > There seems to be unneeded whitespace only changes here that make the
5 > diff less readable
6
7 Sorry about that. I've only changed one cell in that table.
8
9 > Admittedly without a full understanding of the problem, but this looks
10 > wrong to me: SYSROOT, EPREFIX and BROOT are only relevant in build
11 > phases (src_*); (EPREFIX is a little special here but mostly for
12 > convenience). ROOT is only relevant in pkg_* phases. I don't see how
13 > this can work. Say I build a binpkg with ROOT=/ then use that binpkg
14 > with ROOT=/somewhere, you can't go back and change SYSROOT.
15
16 ROOT is used to determine ESYSROOT, not the other way around. As you
17 say, (E)SYSROOT is only relevant in src phases so it doesn't matter if
18 ROOT has changed when installing a binpkg.
19
20 I take your point that setting a src phase variable based on a pkg
21 phase variable seems odd but we're only using ROOT to determine the
22 applicable prefix. We're not taking the actual value of ROOT. When
23 Portage works all this out, it has access to all the necessary
24 variables. It only filters the variables based on the phase function
25 later on.
26
27 > Also, I think the wording could be more "programmatic" (if ... then
28 > ESYSROOT is ... else ... ) to avoid confusion.
29
30 Given that there are three clauses, I thought that using "respectively"
31 would be shorter and clearer but I'll try some other wording to see how
32 it looks.
33
34 --
35 James Le Cuirot (chewi)
36 Gentoo Linux Developer

Replies