public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [RFC] Cleaning up PMS to have ${D} not end with a slash
@ 2013-04-13 21:23 Michał Górny
  2013-04-14  8:31 ` Gregory M. Turner
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Michał Górny @ 2013-04-13 21:23 UTC (permalink / raw
  To: Gentoo Developer Mailing List

[-- 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 --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-04-18 22:36 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-13 21:23 [gentoo-dev] [RFC] Cleaning up PMS to have ${D} not end with a slash Michał Górny
2013-04-14  8:31 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox