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: RFD: EAPI specification in ebuilds
Date: Mon, 19 Mar 2012 01:12:05 +0000	[thread overview]
Message-ID: <jk610t$svf$1@dough.gmane.org> (raw)
In-Reply-To: 20120308184820.108fc30c@googlemail.com

Firstly, wrt probing the ebuild for EAPI=.. I'd just like to point out that 
a regex is not required during the scan, and nor is restricting it to the 
first N lines, though the latter may be desirable and could trivially 
exclude comment and whitespace-only or empty lines.

Ciaran McCreesh wrote:
>Michael Orlitzky wrote:
>> Fair enough, but aren't you arguing the opposite point with Zac? If
>> ebuilds are data, fine, we write EAPI=4 somewhere and be done with
>> it. Anything not having that format is out-of-spec.
> 
> The problem is that right now there's no way to determine the format of
> the data until you already know the format of the data.
Well, we know it's bash.. ;)

> We hack around
> this by not allowing "drastic" format changes, where "drastic" includes
> "using things in newer versions of bash" and "not adding new global
> scope commands".
> 
> The question under discussion is whether we a) keep "what format the
> data is in" as being part of the data, but impose some strange and
> arbitrary conditions on it
Stipulating an allowed set of characters is in no way arbitrary, nor 
strange- we already have similar restrictions on category and package names, 
versions, keywords and USE flags, for example. Requiring that the EAPI 
assignment for a bash .ebuild must be a literal (ie EAPI="foo" or EAPI=foo 
or EAPI='foo') at the start of a line, is not hard to understand; as you 
said ebuild authors already have to deal with lots of other subtle 
restrictions. As Marc Schiffbauer said, EAPI "might be the most important 
constraint in an ebuild at all" (from this and earlier discussion, it's 
clear that it definitely is) -- ebuild developers have to know about it, and 
this is a simple, clear restriction. Michał Górny stated: "The most 
important ebuild variables like EAPI should be readable on sight, without 
having to lookup random variables, functions etc" and in fact, all ebuilds 
in the tree already use a string literal- it just makes more sense from a 
code readability pov, quite apart from anything else.

You mentioned indentation in another mail; afaics there is no problem with 
whitespace at the start of the line.

Ensuring EAPI declaration and sourced value match, has value beyond use in 
EAPI extraction: it's a sanity check that should be performed in any case, 
way before an ebuild hits the tree.

> , b) make a one-time change to have some kind
> of 'header' inside the file describing its format that isn't really part
> of the data itself, or c) admit that GLEP 55 already solved the problem
> and we might as well just fix the issue properly once and for all, even
> if GLEP 55's author is considered by some to be one of Satan's little
> minions.
> 
Regardless of your past behaviour, my objections to GLEP 55 are, and always 
have been, technical: it breaks encapsulation, which once implemented cannot 
be taken back. It results in a mess of filename extensions, which are 
confusing and irrelevant to end-users, as well as making other tools and 
scripts trickier to implement; a simple example: a highlighting editor would 
need to pattern-match the file extension. It's not needed: the simplest, 
least-invasive alternative already works, and should have been adopted years 
ago, when the Council asked for alternatives to be tried. The tree is 
clearly in shape to do so now, though.

Package versions have to be in the filename to avoid collisions, and indeed 
the information is relevant to both end-users and developers. EAPI, while 
vital to the mangler and of immediate concern to developers, matches neither 
of those. Since it is of immediate concern, restricting it to a string 
literal makes sense from both maintenance (which is why it matches tree-
usage) and implementation perspectives. And specifying what characters are 
allowed is a no-brainer; it's odd that that still has not been done, despite 
it also being a requirement for embedding EAPI in filenames.

Your motivation for GLEP-55 states: "In order to get the EAPI the package 
manager needs to source the ebuild." Given a suitable specification, that 
isn't the case. repoman checks and explicit documentation are all that's 
needed beyond that.

As for non-bash ebuilds, I have always agreed with antarus that they should 
simply use a different extension. Adding a new extension per source language 
is a *lot* cleaner than one per EAPI.

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





  parent reply	other threads:[~2012-03-19  1:11 UTC|newest]

Thread overview: 125+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 20:41 [gentoo-dev] RFD: EAPI specification in ebuilds Ulrich Mueller
2012-03-07 20:44 ` Ciaran McCreesh
2012-03-07 21:07 ` Alexis Ballier
2012-03-07 22:04   ` David Leverton
2012-03-07 22:14 ` Michael Orlitzky
2012-03-08  0:17   ` Ulrich Mueller
2012-03-08 12:03   ` Michał Górny
2012-03-08 15:56     ` Michael Orlitzky
2012-03-08 17:28       ` Michał Górny
2012-03-08 17:48         ` Michael Orlitzky
2012-03-08 17:53           ` Ciaran McCreesh
2012-03-08 18:37             ` Michael Orlitzky
2012-03-08 18:48               ` Ciaran McCreesh
2012-03-08 21:35                 ` Michael Orlitzky
2012-03-08 23:31                   ` Alec Warner
2012-03-09  3:05                     ` Michael Orlitzky
2012-03-09  5:04                   ` Michał Górny
2012-03-09  5:35                     ` Michael Orlitzky
2012-03-09  5:51                       ` Zac Medico
2012-03-09 14:42                         ` Michael Orlitzky
2012-03-09 15:05                           ` Zac Medico
2012-03-09 15:21                             ` Michael Orlitzky
2012-03-09 15:41                               ` Zac Medico
2012-03-09 15:51                                 ` Alexis Ballier
2012-03-09 15:58                                   ` Zac Medico
2012-03-09 16:49                                     ` Michael Orlitzky
2012-03-09 16:57                                       ` Zac Medico
2012-03-09 19:20                                       ` Ciaran McCreesh
2012-03-10 16:06                                         ` Zac Medico
2012-03-12  1:55                                           ` Brian Harring
2012-03-12  4:08                                             ` Zac Medico
2012-03-12  8:36                                               ` Brian Harring
2012-03-12 15:35                                                 ` Ciaran McCreesh
2012-03-12 16:05                                                 ` Zac Medico
2012-03-12 16:12                                                   ` Ciaran McCreesh
2012-03-12 16:28                                                     ` Zac Medico
2012-03-14  2:01                                                   ` Brian Harring
2012-03-14  2:16                                                     ` Zac Medico
2012-03-09 15:52                                 ` Ian Stakenvicius
2012-03-09 16:15                                   ` Zac Medico
2012-03-09 16:33                                     ` Eray Aslan
2012-03-09 16:43                                       ` Zac Medico
2012-03-09 16:29                       ` Michał Górny
2012-03-09 16:57                         ` Michael Orlitzky
2012-03-09 17:11                           ` Ulrich Mueller
2012-03-09 17:31                             ` Michael Orlitzky
2012-03-09 17:47                               ` Zac Medico
2012-03-09 18:03                                 ` Michael Orlitzky
2012-03-09 19:08                                 ` Rich Freeman
2012-03-12  2:03                                 ` Brian Harring
2012-03-12  2:20                                   ` Rich Freeman
2012-03-12  2:24                                     ` Alec Warner
2012-03-12  6:57                                       ` Kent Fredric
2012-03-12  6:50                                     ` Kent Fredric
2012-03-12  7:08                                       ` Zac Medico
2012-03-12  7:39                                         ` Kent Fredric
2012-03-12  8:27                                         ` Michał Górny
2012-03-12  8:30                                           ` Ciaran McCreesh
2012-03-12  9:09                                             ` Michał Górny
2012-03-12  9:16                                               ` Kent Fredric
2012-03-12  9:48                                                 ` Ulrich Mueller
2012-03-12 10:12                                                   ` Kent Fredric
2012-03-12 15:20                                                     ` Rich Freeman
2012-03-12 17:01                                                 ` Zac Medico
2012-03-12 17:30                                                   ` Rich Freeman
2012-03-12 17:46                                                     ` Zac Medico
2012-03-12 19:20                                                       ` Rich Freeman
2012-03-12  8:39                                           ` Kent Fredric
2012-03-12  9:10                                             ` Michał Górny
2012-03-12  3:55                                   ` Zac Medico
2012-03-09 17:52                               ` Michał Górny
2012-03-12  1:00                                 ` Brian Harring
2012-03-09 18:02                               ` James Broadhead
2012-03-09 18:24                                 ` Alexis Ballier
2012-03-09 18:29                                   ` Zac Medico
2012-03-09 18:33                                 ` Michael Orlitzky
2012-03-09 18:56                                   ` Zac Medico
2012-03-09 19:23                                     ` Ciaran McCreesh
2012-03-09 20:09                                     ` Michael Orlitzky
2012-03-19  1:12                 ` Steven J Long [this message]
2012-03-19  1:36                   ` [gentoo-dev] " Kent Fredric
2012-03-19  3:21                     ` Brian Harring
2012-03-24 13:24                     ` [gentoo-dev] " Steven J Long
2012-03-07 22:36 ` [gentoo-dev] " Alexandre Rostovtsev
2012-03-08  2:22   ` Jeroen Roovers
2012-03-08 16:14     ` [gentoo-dev] Ebb (eb) was: " Todd Goodman
2012-03-08  4:12 ` [gentoo-dev] " Alec Warner
2012-03-08  7:27   ` Ulrich Mueller
2012-03-08  8:13     ` Alec Warner
2012-03-08 15:27       ` Zac Medico
2012-03-08 16:11         ` David Leverton
2012-03-08 16:21           ` Zac Medico
2012-03-08 16:29             ` Ciaran McCreesh
2012-03-08 16:50               ` Zac Medico
2012-03-08 16:59               ` Alexandre Rostovtsev
2012-03-08 17:03                 ` Ciaran McCreesh
2012-03-08 19:17                   ` Ulrich Mueller
2012-03-08 19:31                     ` Ciaran McCreesh
2012-03-08 19:48                       ` Alexis Ballier
2012-03-08  9:42     ` Marc Schiffbauer
2012-03-08 16:30       ` Zac Medico
2012-03-08 16:35         ` Ciaran McCreesh
2012-03-08 17:07           ` Zac Medico
2012-03-08 17:14             ` Ciaran McCreesh
2012-03-08 17:30               ` Jeroen Roovers
2012-03-08 17:37                 ` Ciaran McCreesh
2012-03-10  1:06                 ` Kent Fredric
2012-03-10 13:53                   ` Ciaran McCreesh
2012-03-09 11:28         ` Marc Schiffbauer
2012-03-08 12:06   ` Michał Górny
2012-03-08 15:58 ` Michael Orlitzky
2012-03-08 16:51   ` Ulrich Mueller
2012-03-08 17:03     ` Rich Freeman
2012-03-08 16:47 ` Mike Gilbert
2012-03-08 17:52 ` Michał Górny
2012-03-08 17:56   ` Ciaran McCreesh
2012-03-08 18:22   ` Zac Medico
2012-03-08 19:04   ` Ulrich Mueller
2012-03-08 19:38     ` Alexis Ballier
2012-03-09  0:50 ` Walter Dnes
2012-03-18  7:23 ` Ralph Sennhauser
2012-03-18 11:18   ` Rich Freeman
2012-03-18 11:27   ` Ulrich Mueller
2012-04-12 19:53 ` [gentoo-dev] " Ulrich Mueller
2012-04-12 20:19   ` Mike Frysinger

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='jk610t$svf$1@dough.gmane.org' \
    --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