From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-dev+bounces-50201-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1S6vb3-0007Af-TD
	for garchives@archives.gentoo.org; Mon, 12 Mar 2012 03:06:54 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 804E9E0B22
	for <garchives@archives.gentoo.org>; Mon, 12 Mar 2012 03:06:53 +0000 (UTC)
Received: from mail-vx0-f181.google.com (mail-vx0-f181.google.com [209.85.220.181])
	by pigeon.gentoo.org (Postfix) with ESMTP id E36D7E09C0
	for <gentoo-dev@lists.gentoo.org>; Mon, 12 Mar 2012 02:20:13 +0000 (UTC)
Received: by vcge1 with SMTP id e1so4304871vcg.40
        for <gentoo-dev@lists.gentoo.org>; Sun, 11 Mar 2012 19:20:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:sender:in-reply-to:references:date
         :x-google-sender-auth:message-id:subject:from:to:cc:content-type
         :content-transfer-encoding;
        bh=lDcbHFbtwRfsuaC/5L8yBAGZaTcSF8Zx1m/cQmCeaRg=;
        b=WVrMiDi9z1HH7AEjPtUFhfpouXH5X9TIcUfxnqwf9JKi93cZLN5YozCddQOwOEPhXw
         RxHfAFY/fgQgYVW+00QiX7oCz6LyDVgblqb7OMgkW6ELZAcNASqiD+7FSoRi2w2zrBMq
         wAy0p3aLvIr9K6Ds8SgGbOehluysPfPfXbBYqXQUsNZ4dEWB3SXlpQH6L+z61JN5+zOv
         QIkkiO/1PNqZhVJcCkCV/R8+9j613FHJsfRCLv3VNK8VqjZOwlRV9/36R00qhyn2b9UU
         d6BaBOoPbwRLiRWs1/+GzA+XOtoKsnlYq//qKAqCqtF2DX+FzRSimAvIuUANFxHk69jQ
         ngxQ==
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
MIME-Version: 1.0
Received: by 10.52.173.38 with SMTP id bh6mr12859748vdc.43.1331518813393; Sun,
 11 Mar 2012 19:20:13 -0700 (PDT)
Sender: freemanrich@gmail.com
Received: by 10.220.68.74 with HTTP; Sun, 11 Mar 2012 19:20:13 -0700 (PDT)
In-Reply-To: <20120312020344.GE7579@localhost>
References: <4F58FC55.7070005@orlitzky.com>
	<20120308184820.108fc30c@googlemail.com>
	<4F592612.6050203@orlitzky.com>
	<20120309060424.09cdce1e@pomiocik.lan>
	<4F599692.9050503@orlitzky.com>
	<20120309172921.281ee5a0@pomiocik.lan>
	<4F5A368D.2020605@orlitzky.com>
	<20314.14772.897891.110368@a1i15.kph.uni-mainz.de>
	<4F5A3E6C.4040900@orlitzky.com>
	<4F5A4246.8080605@gentoo.org>
	<20120312020344.GE7579@localhost>
Date: Sun, 11 Mar 2012 22:20:13 -0400
X-Google-Sender-Auth: GWq0W2iH7rR_UVN4c_7BoPBTRwM
Message-ID: <CAGfcS_=+7E-=zTMLEEFwM8xG4R21AJ3xWaS_HCE8P7PUEtNSyA@mail.gmail.com>
Subject: Re: [gentoo-dev] RFD: EAPI specification in ebuilds
From: Rich Freeman <rich0@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: Zac Medico <zmedico@gentoo.org>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 3ba43853-3e51-47ec-ab82-0abcf83e37ee
X-Archives-Hash: ee70bacd2fce8fafcc47f40de01c13d1

On Sun, Mar 11, 2012 at 10:03 PM, Brian Harring <ferringb@gmail.com> wrote:
> Pragmatic reality, the eapi function actually would work fine. =A0As
> pointed out elsewhere, bash parses as it goes- which isn't going to
> change.

Unless the ebuild isn't written in bash...

How do you source the ebuild if you don't know what to use to source
it?  How do you know what to use to source it if you don't know the
EAPI?  Right now all the existing EAPIs use bash, but there is no
reason the file couldn't be xml, or python, or just about anything
else.

If we want to allow for that kind of flexibility, then it might make
sense to go ahead and state that our convention is to stick EAPI=3D5 in
one of the first few lines of the ebuild, or inside a comment, but
also go a step further and state that the text "EAPI=3D" cannot appear
elsewhere in the ebuild (or perhaps within the first 10 lines).  Just
about any file format we might use would allow us to make "EAPI=3D"
appear in it, but not all could guarantee that it would occur at the
start of a line, or at the start of a line immediately after a #.

In any case, I can really see the KISS value in a very rigid syntax
that is trivial to parse.  Stuff like this almost makes me wish our
ebuilds already were xml files or such, with bash embedded inside
sections.  Finding a particular tag in an xml file is trivial as the
fundamentals haven't changed in 15 years.

Rich