public inbox for gentoo-pms@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-pms] Characters allowed in EAPI names
@ 2012-02-27 11:06 Ulrich Mueller
  2012-02-27 23:17 ` David Leverton
  0 siblings, 1 reply; 10+ messages in thread
From: Ulrich Mueller @ 2012-02-27 11:06 UTC (permalink / raw
  To: gentoo-pms

AFAICS, the spec doesn't say anything about the characters allowed in
the name of an EAPI. We should restrict it to something sane, like
this:

   An EAPI name may contain any of the characters [A-Za-z0-9+_.-].
   It must not begin with a hyphen, a dot or a plus sign.

Ulrich



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

* Re: [gentoo-pms] Characters allowed in EAPI names
  2012-02-27 11:06 [gentoo-pms] Characters allowed in EAPI names Ulrich Mueller
@ 2012-02-27 23:17 ` David Leverton
  2012-02-28  7:40   ` Ulrich Mueller
  0 siblings, 1 reply; 10+ messages in thread
From: David Leverton @ 2012-02-27 23:17 UTC (permalink / raw
  To: gentoo-pms

On 27 February 2012 11:06, Ulrich Mueller <ulm@gentoo.org> wrote:
> AFAICS, the spec doesn't say anything about the characters allowed in
> the name of an EAPI.

I think the logic behind that is that an EAPI defined outside PMS
wouldn't be bound by PMS's rules anyway, and the EAPIs defined inside
PMS are explicitly listed so there's not much point giving a general
syntactic rule as well (and if there was one, it might encourage
people to write code that blows up messily when it sees a hypothetical
non-PMS EAPI that doesn't obey the rule, rather than simply treating
it as unknown).



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

* Re: [gentoo-pms] Characters allowed in EAPI names
  2012-02-27 23:17 ` David Leverton
@ 2012-02-28  7:40   ` Ulrich Mueller
  2012-02-28  7:45     ` Ciaran McCreesh
  0 siblings, 1 reply; 10+ messages in thread
From: Ulrich Mueller @ 2012-02-28  7:40 UTC (permalink / raw
  To: gentoo-pms

>>>>> On Mon, 27 Feb 2012, David Leverton wrote:

> I think the logic behind that is that an EAPI defined outside PMS
> wouldn't be bound by PMS's rules anyway, and the EAPIs defined
> inside PMS are explicitly listed so there's not much point giving a
> general syntactic rule as well [...]

If we follow this logic, then the following sentence should be removed
from PMS:

"EAPIs whose value starts with the string paludis- are reserved for
experimental use by the Paludis package manager."

Ulrich



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

* Re: [gentoo-pms] Characters allowed in EAPI names
  2012-02-28  7:40   ` Ulrich Mueller
@ 2012-02-28  7:45     ` Ciaran McCreesh
  2012-03-15  1:52       ` Brian Harring
  0 siblings, 1 reply; 10+ messages in thread
From: Ciaran McCreesh @ 2012-02-28  7:45 UTC (permalink / raw
  To: gentoo-pms

[-- Attachment #1: Type: text/plain, Size: 809 bytes --]

On Tue, 28 Feb 2012 08:40:05 +0100
Ulrich Mueller <ulm@gentoo.org> wrote:
> >>>>> On Mon, 27 Feb 2012, David Leverton wrote:
> > I think the logic behind that is that an EAPI defined outside PMS
> > wouldn't be bound by PMS's rules anyway, and the EAPIs defined
> > inside PMS are explicitly listed so there's not much point giving a
> > general syntactic rule as well [...]
> 
> If we follow this logic, then the following sentence should be removed
> from PMS:
> 
> "EAPIs whose value starts with the string paludis- are reserved for
> experimental use by the Paludis package manager."

Don't tell anyone, but that's mostly just in there because some people
insisted that EAPIs were numbers (and thus comparable), so I wanted an
explicit mention of one that wasn't.

-- 
Ciaran McCreesh

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [gentoo-pms] Characters allowed in EAPI names
  2012-02-28  7:45     ` Ciaran McCreesh
@ 2012-03-15  1:52       ` Brian Harring
  2012-03-15  7:34         ` Ulrich Mueller
  0 siblings, 1 reply; 10+ messages in thread
From: Brian Harring @ 2012-03-15  1:52 UTC (permalink / raw
  To: gentoo-pms

On Tue, Feb 28, 2012 at 07:45:51AM +0000, Ciaran McCreesh wrote:
> On Tue, 28 Feb 2012 08:40:05 +0100
> Ulrich Mueller <ulm@gentoo.org> wrote:
> > >>>>> On Mon, 27 Feb 2012, David Leverton wrote:
> > > I think the logic behind that is that an EAPI defined outside PMS
> > > wouldn't be bound by PMS's rules anyway, and the EAPIs defined
> > > inside PMS are explicitly listed so there's not much point giving a
> > > general syntactic rule as well [...]
> > 
> > If we follow this logic, then the following sentence should be removed
> > from PMS:
> > 
> > "EAPIs whose value starts with the string paludis- are reserved for
> > experimental use by the Paludis package manager."
> 
> Don't tell anyone, but that's mostly just in there because some people
> insisted that EAPIs were numbers (and thus comparable), so I wanted an
> explicit mention of one that wasn't.

A hard rule there is a bit dumb, although frankly I don't hugely 
care one way or another- if we have it, extend it to the three 
rather than just paludis.  Or drop it, don't hugely care.

EAPI *does* need to be tightened to make clear the first char of EAPI 
can't be '-'; it's used now via the cache as a marker to indicate that 
it pulled the EAPI, but didn't know how to handle it.  It's live and 
in use, and has been an undocumented requirement basically since day 
1.

No one is going to conflict with it, just best to explicitly note it's 
offlimits as the first char of an EAPI name.
~harring



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

* Re: [gentoo-pms] Characters allowed in EAPI names
  2012-03-15  1:52       ` Brian Harring
@ 2012-03-15  7:34         ` Ulrich Mueller
  2012-03-15 17:56           ` Ulrich Mueller
  2012-03-15 22:55           ` Arfrever Frehtes Taifersar Arahesis
  0 siblings, 2 replies; 10+ messages in thread
From: Ulrich Mueller @ 2012-03-15  7:34 UTC (permalink / raw
  To: gentoo-pms

>>>>> On Wed, 14 Mar 2012, Brian Harring wrote:

> A hard rule there is a bit dumb, although frankly I don't hugely 
> care one way or another- if we have it, extend it to the three 
> rather than just paludis.  Or drop it, don't hugely care.

> EAPI *does* need to be tightened to make clear the first char of
> EAPI can't be '-'; it's used now via the cache as a marker to
> indicate that it pulled the EAPI, but didn't know how to handle it.
> It's live and in use, and has been an undocumented requirement
> basically since day 1.

> No one is going to conflict with it, just best to explicitly note
> it's offlimits as the first char of an EAPI name.

Yes, and I wonder why there was resistance against my suggestion.

   An EAPI name may contain any of the characters [A-Za-z0-9+_.-].
   It must not begin with a hyphen, a dot or a plus sign.

It's consistent with what we have for other names, like slot or
category: <http://dev.gentoo.org/~ulm/pms/head/pms.html#x1-170003.1>

Ulrich



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

* Re: [gentoo-pms] Characters allowed in EAPI names
  2012-03-15  7:34         ` Ulrich Mueller
@ 2012-03-15 17:56           ` Ulrich Mueller
  2012-03-17 15:48             ` Ulrich Mueller
  2012-03-15 22:55           ` Arfrever Frehtes Taifersar Arahesis
  1 sibling, 1 reply; 10+ messages in thread
From: Ulrich Mueller @ 2012-03-15 17:56 UTC (permalink / raw
  To: gentoo-pms

>    An EAPI name may contain any of the characters [A-Za-z0-9+_.-].
>    It must not begin with a hyphen, a dot or a plus sign.

> It's consistent with what we have for other names, like slot or
> category: <http://dev.gentoo.org/~ulm/pms/head/pms.html#x1-170003.1>

From 742f67c913e3bb2c79dc4a18ebb83392ba9b9eea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@gentoo.org>
Date: Thu, 15 Mar 2012 18:48:01 +0100
Subject: [PATCH] Specify characters allowed for an EAPI value.

---
 eapis.tex |    2 +-
 names.tex |    5 +++++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/eapis.tex b/eapis.tex
index 05bf4d7..5839768 100644
--- a/eapis.tex
+++ b/eapis.tex
@@ -3,7 +3,7 @@
 \section{Definition}
 
 An EAPI can be thought of as a `version' of this specification to which a package conforms. An EAPI
-value is a string, and is part of an ebuild's metadata.
+value is a string as per section~\ref{sec:eapi-names}, and is part of an ebuild's metadata.
 
 If a package manager encounters a package version with an unrecognised EAPI, it must not attempt to
 perform any operations upon it. It could, for example, ignore the package version entirely (although
diff --git a/names.tex b/names.tex
index c99ed0f..fd9731c 100644
--- a/names.tex
+++ b/names.tex
@@ -48,6 +48,11 @@ assumed that any user accepting keyword \t{\textasciitilde{}foo} will also accep
 
 The exact meaning of any keywords value is beyond the scope of this specification.
 
+\subsection{EAPI Names}
+\label{sec:eapi-names}
+An EAPI name may contain any of the characters [\t{A-Za-z0-9+\_.-}]. It must not begin with a
+hyphen, a dot or a plus sign.
+
 \section{Version Specifications}
 The package manager must not impose fixed limits upon the number of version components. Package
 managers should indicate or reject any version that is invalid according to these rules.
-- 
1.7.8.5




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

* Re: [gentoo-pms] Characters allowed in EAPI names
  2012-03-15  7:34         ` Ulrich Mueller
  2012-03-15 17:56           ` Ulrich Mueller
@ 2012-03-15 22:55           ` Arfrever Frehtes Taifersar Arahesis
  2012-03-15 23:19             ` Ulrich Mueller
  1 sibling, 1 reply; 10+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2012-03-15 22:55 UTC (permalink / raw
  To: Gentoo PMS Development

[-- Attachment #1: Type: Text/Plain, Size: 1030 bytes --]

2012-03-15 08:34:33 Ulrich Mueller napisał(a):
> >>>>> On Wed, 14 Mar 2012, Brian Harring wrote:
> 
> > A hard rule there is a bit dumb, although frankly I don't hugely 
> > care one way or another- if we have it, extend it to the three 
> > rather than just paludis.  Or drop it, don't hugely care.
> 
> > EAPI *does* need to be tightened to make clear the first char of
> > EAPI can't be '-'; it's used now via the cache as a marker to
> > indicate that it pulled the EAPI, but didn't know how to handle it.
> > It's live and in use, and has been an undocumented requirement
> > basically since day 1.
> 
> > No one is going to conflict with it, just best to explicitly note
> > it's offlimits as the first char of an EAPI name.
> 
> Yes, and I wonder why there was resistance against my suggestion.
> 
>    An EAPI name may contain any of the characters [A-Za-z0-9+_.-].

Why you don't include e.g. '!', '@', '#', '$', '€', '%', '*', '=' or ':' in this list?

-- 
Arfrever Frehtes Taifersar Arahesis

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [gentoo-pms] Characters allowed in EAPI names
  2012-03-15 22:55           ` Arfrever Frehtes Taifersar Arahesis
@ 2012-03-15 23:19             ` Ulrich Mueller
  0 siblings, 0 replies; 10+ messages in thread
From: Ulrich Mueller @ 2012-03-15 23:19 UTC (permalink / raw
  To: gentoo-pms

>>>>> On Thu, 15 Mar 2012, Arfrever Frehtes Taifersar Arahesis wrote:

> Why you don't include e.g. '!', '@', '#', '$', '€', '%', '*', '=' or
> ':' in this list?

Rationale why we should include any of these? None of them is in the
POSIX "portable filename character set" [1].

(And the Euro sign? Makes me wonder if you posted this 17 days too
early.)

Ulrich

[1] <http://pubs.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html#tag_03_276>



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

* Re: [gentoo-pms] Characters allowed in EAPI names
  2012-03-15 17:56           ` Ulrich Mueller
@ 2012-03-17 15:48             ` Ulrich Mueller
  0 siblings, 0 replies; 10+ messages in thread
From: Ulrich Mueller @ 2012-03-17 15:48 UTC (permalink / raw
  To: gentoo-pms

>>>>> On Thu, 15 Mar 2012, Ulrich Mueller wrote:

> Subject: [PATCH] Specify characters allowed for an EAPI value.

I've committed this now.

Ulrich



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

end of thread, other threads:[~2012-03-17 15:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-27 11:06 [gentoo-pms] Characters allowed in EAPI names Ulrich Mueller
2012-02-27 23:17 ` David Leverton
2012-02-28  7:40   ` Ulrich Mueller
2012-02-28  7:45     ` Ciaran McCreesh
2012-03-15  1:52       ` Brian Harring
2012-03-15  7:34         ` Ulrich Mueller
2012-03-15 17:56           ` Ulrich Mueller
2012-03-17 15:48             ` Ulrich Mueller
2012-03-15 22:55           ` Arfrever Frehtes Taifersar Arahesis
2012-03-15 23:19             ` Ulrich Mueller

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