public inbox for gentoo-pms@lists.gentoo.org
 help / color / mirror / Atom feed
From: Zac Medico <zmedico@gentoo.org>
To: gentoo-pms@lists.gentoo.org
Subject: Re: [gentoo-pms] [PATCH] EAPI must be at least a single char.
Date: Sun, 30 Sep 2012 17:25:04 -0700	[thread overview]
Message-ID: <5068E2E0.8080803@gentoo.org> (raw)
In-Reply-To: <20120930222235.GH2180@localhost>

On 09/30/2012 03:22 PM, Brian Harring wrote:
> On Sun, Sep 30, 2012 at 12:52:40PM -0700, Zac Medico wrote:
>> On 09/30/2012 12:44 PM, Brian Harring wrote:
>>> tries to write a PM, likely fucking that up.  If what you were saying 
>>> was the actual intention behind it, that assignment would've just been 
>>> along the lines of EAPI=("[^"]*"|'[^']*'|[^\t ]); aka "here's how you 
>>> grab what looks like an EAPI assignment".
>>
>> I would have preferred a regex that just matches any assignment like
>> this, but didn't feel like bikeshedding it, since the one that's
>> currently in the spec works in practice.
> 
> Counter point; portage doesn't actually enforce the rules of a valid 
> EAPI name; correct me if I'm wrong obviously, but in checking the 
> source, didn't see any such validation.

It doesn't need to check that EAPI names are valid. It only needs to
check that they are supported, so that's what it does.

> If the regex were as I suggested, that would be a non issue and we'd 
> have *guranteed* EAPI name compliance- else it wouldn't match the 
> invalid EAPI, and would stop looking at that line (falling back to 
> EAPI=0).
> 
> Basically, I'd like y'all to spell out the actual gains of having it 
> loose like this, especailly in light of the fact the majority PM, via 
> relying on that alone, doesn't do EAPI value enforcement.

It's enforced by the fact that all supported EAPIs happen to have valid
EAPI values.

> If we used the regex I suggested in the second email, this issue goes 
> away, and we remove a potential landmine.
> 
> Clarify to me why that landmine should be left in place.

The current spec works in practice, and that's all I really care about.
Still, I'd be in favor of changing the regex to match practically
anything that looks like an EAPI assignment, regardless of the validity
of the EAPI value.
-- 
Thanks,
Zac


  reply	other threads:[~2012-10-01  3:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-30  8:28 [gentoo-pms] [PATCH] EAPI must be at least a single char Brian Harring
2012-09-30  9:13 ` Ulrich Mueller
2012-09-30 19:44   ` Brian Harring
2012-09-30 19:52     ` Zac Medico
2012-09-30 22:10       ` Ulrich Mueller
2012-10-01  0:48         ` Zac Medico
2012-09-30 22:22       ` Brian Harring
2012-10-01  0:25         ` Zac Medico [this message]
2012-10-01  7:15           ` Ulrich Mueller
2012-10-01 16:33             ` Zac Medico

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=5068E2E0.8080803@gentoo.org \
    --to=zmedico@gentoo.org \
    --cc=gentoo-pms@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