Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Unified directory slash convention for EAPI6?
Date: Sun, 31 Aug 2014 21:39:48
Message-Id: 20140831233931.64c6125c@pomiot.lan
1 Hello, developers.
3 The directory conventions in PMS are confusing developers for a long
4 time. Long story short, D, ED, ROOT and EROOT are supposed to contain
5 a trailing slash while remaining directory variables don't. This often
6 confuses developers and brings repeating mistakes resulting in double
7 slashes in paths.
9 For example, developers often write '${D}/usr/bin/foo', while they
10 should '${D}usr/bin/foo'. Of course, this gets more complicated with
11 every variable added. For example, if you were to reference
12 bashcompdir, you'd have to use pattern substitution to actually remove
13 double slashes, e.g. '${D%/}$(get_bashcompdir)'.
15 More than a year ago, I've suggested that we unify the convention for
16 directories and require all of them not to contain a trailing slash
17 [1]. The bug contains all the details, including statistics (year old
18 but still) and repoman check suggestions.
20 I would like to suggest finally doing the change for the sake of
21 improved consistency. EAPI 6 is a great opportunity to clean up some of
22 the historical mess, and make ebuild writing have one pitfall less.
24 What do you think?
26 [1]:
28 --
29 Best regards,
30 Michał Górny


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


Subject Author
Re: [gentoo-dev] Unified directory slash convention for EAPI6? Joshua Kinard <kumba@g.o>