Gentoo Archives: gentoo-dev

From: "Aaron W. Swenson" <titanofold@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] Cleaning up PMS to have ${D} not end with a slash
Date: Mon, 15 Apr 2013 10:57:00
Message-Id: 20130415105644.GA5854@gengoff.local.grandmasfridge.org
In Reply to: Re: [gentoo-dev] [RFC] Cleaning up PMS to have ${D} not end with a slash by "Michał Górny"
1 On Sun, Apr 14, 2013 at 06:59:19PM +0200, Michał Górny wrote:
2 > On Sun, 14 Apr 2013 17:39:44 +0100
3 > Ciaran McCreesh <ciaran.mccreesh@××××××××××.com> wrote:
4 >
5 > > On Sun, 14 Apr 2013 16:58:07 +0200
6 > > Michał Górny <mgorny@g.o> wrote:
7 > > > On Sun, 14 Apr 2013 15:22:42 +0100
8 > > > Ciaran McCreesh <ciaran.mccreesh@××××××××××.com> wrote:
9 > > > > On Sat, 13 Apr 2013 23:23:57 +0200
10 > > > > Michał Górny <mgorny@g.o> wrote:
11 > > > > Should ROOT usually be empty then?
12 > > >
13 > > > Considering its use, probably yes.
14 > > >
15 > > > ${ROOT}/usr/bin/foo
16 > > > ${EPREFIX}/usr/bin/foo
17 > > > ${D}${EPREFIX}/usr/bin/foo
18 > > >
19 > > > All seem clean and consistent to me.
20 > >
21 > > How many things test whether ROOT=/ ? I seem to recall that being
22 > > fairly common, back when something accidentally set it to //.
23 >
24 > Yes, that sucks a fair bit. There are many ebuilds doing that, and most
25 > of those ebuilds append additional slash after it anyway... we really
26 > suck at consistency.
27 >
28
29 We're only accountable insofar as ROOT defaults to "/".
30
31 ROOT being a user set variable, having ROOT be an empty string by
32 default still does not guarantee that ROOT won't end with a
33 slash. Even if we change it so that it defaults to an empty string, it
34 won't negate the need to do ${ROOT%/}/some/path.
35
36 The only thing that would help is if PMS defined that ROOT must not
37 end with a slash. In which case it would be up to the package manage
38 to modify ROOT before it gets evaluated in an ebuild.
39
40 --
41 Mr. Aaron W. Swenson
42 Gentoo Linux Developer
43 Email : titanofold@g.o
44 GnuPG FP : 2C00 7719 4F85 FB07 A49C 0E31 5713 AA03 D1BB FDA0
45 GnuPG ID : D1BBFDA0

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] [RFC] Cleaning up PMS to have ${D} not end with a slash Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>