public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Steven J. Long" <slong@rathaus.eclipse.co.uk>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Re: Re: [RFC] Cleaning up PMS to have ${D} not end with a slash
Date: Fri, 19 Apr 2013 00:02:24 +0100	[thread overview]
Message-ID: <20130418230224.GA2509@rathaus.eclipse.co.uk> (raw)
In-Reply-To: <516C4CDE.10205@malth.us>

On Mon, Apr 15, 2013 at 11:54:22AM -0700, Gregory M. Turner wrote:
> On 4/15/2013 10:31 AM, Steven J. Long wrote:
> > On Mon, Apr 15, 2013 at 12:01:24PM +0100, Ciaran McCreesh wrote:
> >> The spec guarantees that ROOT will be non-empty and end in a slash. If
> >> Portage isn't enforcing this, file a bug.
> > Yes, but his point was this:
> >
> >>> The only thing that would help is if PMS defined that ROOT must not
> >>> end with a slash.
> >   
> > ie, let the mangler enforce empty or a valid directory not ending in a
> > slash, which is hardly difficult, and makes ROOT easier to work with,
> > along the lines of how any shellscripter would do it, similarly to the
> > motivation for the change to D. Only with ROOT it's much more important
> > that the path is correctly-formed for cross-platform compatibility.

> That's how EPREFIX works; indeed, you don't need to do ${EPREFIX%/}, 
> ever (unless, perhaps, we are manually scrubbing user inputs that 
> haven't been scrubbed by portage).  Try it yourself: EPREFIX="/" 
> portageq envvar EPREFIX.

And you took that decision because it makes writing ebuilds simpler.

> If we "wanted to" do the same thing to {E,}ROOT we could, at least in 
> future EAPIs.

Sure, exactly the point: ED and EROOT (equiv D and ROOT) should just be
easy to work with. After all that is the whole reason to provide an ebuild
infrastructure in the first place: to make it easy to write scriptlets that
compile and install software. Anything that improves that, while staying
robust as shell, is worth doing imo. Especially low-hanging fruit like this.

> However, given that ROOT is named "ROOT", "/" makes some kind of 
> reasonable, intuitive sense.

Ofc it does, and I understand where it came from. It just happens to be
useless in shellscript, which is what ebuilds are. Nor is anyone arguing
that it should change in configuration, or eg in portageq. Just in ebuild
space, which was the point Aaron brought up, that Ciaran decided to snip
from his reply, while making some random point about portage that had
nothing to do with anything.

>  I see double-slash mistakes involving ROOT 
> here and there, but they are not hopelessly ubiquitous as they are with 
> D, where, as Michał demonstrates in #465772, approximately 10 ebuilds in 
> portage use the variable incorrectly for every 1 getting it right!

Why not just be consistent across all directory variables, which can be
done very simply in ebuild.sh, and never have to worry about it for any of
them?

Seems a lot simpler and more robust to me, and we can get on with our lives
instead of reading long-winded discussions about whether it's "worth the
effort" to support prefix or alt-installs.

IMO some of those people should "make the effort" to learn the language
they're implementing in, instead of criticizing what they clearly don't
grok. And the rest should go back to the swamp.

Regards,
steveL.
-- 
#friendly-coders -- We're friendly, but we're not /that/ friendly ;-)


      reply	other threads:[~2013-04-18 22:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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                 ` Steven J. Long [this message]

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=20130418230224.GA2509@rathaus.eclipse.co.uk \
    --to=slong@rathaus.eclipse.co.uk \
    --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