Gentoo Archives: gentoo-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] meaning of EROOT
Date: Sun, 03 Feb 2013 20:56:49
Message-Id: 510ECEFD.8060405@gentoo.org
In Reply to: [gentoo-dev] meaning of EROOT by heroxbd
1 On 02/03/2013 03:07 AM, heroxbd wrote:
2 > Dear All,
3 >
4 > I am a bit confused with the meaning of EROOT.
5 >
6 > In a usual Prefix installation, ROOT=/ and EPREFIX=/opt/gentoo,
7 > EROOT=/opt/gentoo/.
8 >
9 > Naturally, EROOT=${EPREFIX}${ROOT}, right?
10
11 No, it's EROOT=${ROOT%/}${EPREFIX}/
12
13 > But for example in ./python.eclass
14 >
15 > EROOT="${ROOT%/}${EPREFIX}/"
16 >
17 > and in LocationsManager.py of portage
18 >
19 > self.eroot = self.target_root.rstrip(os.sep) + self.eprefix + os.sep
20 >
21 > What is the logic behind this construction?
22
23 ROOT corresponds to a valid chroot point. EPREFIX is an offset inside a
24 valid chroot point.
25
26 > The problem rises when I want to cross-compile under Prefix. Taking
27 > armv7a-hardfloat-linux-gnueabi for example,
28 > ROOT=/usr/armv7a-hardfloat-linux-gnueabi/, EPREFIX=/opt/gentoo. I'd
29 > expect EROOT to be ${EPREFIX}${ROOT}, therefore,
30 > /opt/gentoo/usr/armv7a-hardfloat-linux-gnueabi/. At present
31 > EROOT=/usr/armv7a-hardfloat-linux-gnueabi/opt/gentoo/, which is
32 > completely useless.
33
34 You've filed this bug on the same topic:
35
36 https://bugs.gentoo.org/show_bug.cgi?id=395633
37
38 We should continue there.
39 --
40 Thanks,
41 Zac