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.
2
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.
8
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)'.
14
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.
19
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.
23
24 What do you think?
25
26 [1]:https://bugs.gentoo.org/show_bug.cgi?id=465772
27
28 --
29 Best regards,
30 Michał Górny

Attachments

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

Replies

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