From: "Michał Górny" <mgorny@gentoo.org>
To: Gentoo Developer Mailing List <gentoo-dev@lists.gentoo.org>
Subject: [gentoo-dev] [RFC] Cleaning up PMS to have ${D} not end with a slash
Date: Sat, 13 Apr 2013 23:23:57 +0200 [thread overview]
Message-ID: <20130413232357.0711438b@pomiocik.lan> (raw)
[-- Attachment #1: Type: text/plain, Size: 1774 bytes --]
Hello,
As most of you probably doesn't know, PMS guarantees that ${D} always
ends with a slash. It seems that this particular wording was enforced
by historical portage behavior (instead of fixing the ebuilds...) yet
it didn't ever get really widespread.
Specifically, it is awfully counter-intuitive and even PMS gets it
wrong in most of the time (see: einstall). I could sum up the issues
with it in three snippets:
1) "${D}"usr/bin/foo
2) emake install DESTDIR="${D%/}"
3) local foodir=/usr/share/foo
insinto ${foodir}
...
bar "${D}${foodir#/}"
Ugly, isn't it? And since it's completely counter-intuitive, most
ebuilds and eclasses get it wrong. Either by appending a slash just to
be sure (and having double slashes) or even conditionally stripping one.
While we could keep 'fixing' the ebuilds to follow the weird PMS
requirement, I'd rather go the other way -- fixing PMS to reflect
common sense.
The plan would be to:
1) lift the requirement that ${D} needs to end with slash,
2) fix all the ebuilds and eclasses which rely on that to use explicit
slash -- resulting in double slashes in the transition period,
3) make portage not append the slash anymore,
4) update PMS to specify that all directory variables do not end with
a slash,
5) slowly update the remaining ebuilds and eclasses to remove
the conditional slash removal/appending code.
This is mostly possible since majority of systems supported by Gentoo
does work fine with double slashes in paths, and the custom Cygwin port
fails randomly anyway due to this specific issue. We'd break it
completely for the transition period but afterwards, it will all be
clean and sane again.
Your thoughts?
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]
next reply other threads:[~2013-04-13 21:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-13 21:23 Michał Górny [this message]
2013-04-14 8:31 ` [gentoo-dev] [RFC] Cleaning up PMS to have ${D} not end with a slash Gregory M. Turner
2013-04-14 10:24 ` Peter Stuge
2013-04-14 11:32 ` Michał Górny
2013-04-14 11:34 ` Michał Górny
2013-04-14 14:14 ` hasufell
2013-04-14 15:01 ` Michał Górny
2013-04-14 14:22 ` Ciaran McCreesh
2013-04-14 14:58 ` Michał Górny
2013-04-14 16:39 ` Ciaran McCreesh
2013-04-14 16:59 ` Michał Górny
2013-04-15 10:56 ` Aaron W. Swenson
2013-04-15 11:01 ` Ciaran McCreesh
2013-04-15 17:31 ` [gentoo-dev] " Steven J. Long
2013-04-15 18:54 ` Gregory M. Turner
2013-04-18 23:02 ` [gentoo-dev] " Steven J. Long
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130413232357.0711438b@pomiocik.lan \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox