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-50214-garchives=archives.gentoo.org@lists.gentoo.org>) id 1S70oA-0001oh-KS for garchives@archives.gentoo.org; Mon, 12 Mar 2012 08:40:46 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BD614E0AD5; Mon, 12 Mar 2012 08:40:27 +0000 (UTC) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 22011E0A9D for <gentoo-dev@lists.gentoo.org>; Mon, 12 Mar 2012 08:39:53 +0000 (UTC) Received: by lbok6 with SMTP id k6so998124lbo.40 for <gentoo-dev@lists.gentoo.org>; Mon, 12 Mar 2012 01:39:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=sV2J1MUax2rnYUTycgayLf9t931mQRX0kTlDnJSXY7M=; b=fQsxEgWr08F0CwvB1nbnY3TpnrYa9UbI0w7+WO8opSAT9gcfnPxx6NlUyg3OShK4FC +6jV9U/GHL/pgAuRKLKtzESS6wXEMWjF14zbtu/jR4/06R8mO+NLomJskG39ObAzdUG6 noFmDxBix0qQXrmkYf1YZ/c3OSjqsPcMDn1w9TMuQ0q9O/e1h/GbFvYXSeBWLE+d/07+ +bpr+JxsyZhQ9JXzRCYrIrJqFwQhyL9rzKt6q4etUVcxu7/5ESR4F1h/c3S/h+cAOCJd VFi9pEU6HCjUF9kGxb0OQN7jJ/N+u4buCPEwR/ThLYnqM8C8ySkLqcdFsHu7cYqjlWSK xjaw== 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.112.48.130 with SMTP id l2mr4381678lbn.41.1331541593056; Mon, 12 Mar 2012 01:39:53 -0700 (PDT) Received: by 10.112.102.195 with HTTP; Mon, 12 Mar 2012 01:39:52 -0700 (PDT) In-Reply-To: <20120312092711.7dbd969f@pomiocik.lan> 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> <CAGfcS_=+7E-=zTMLEEFwM8xG4R21AJ3xWaS_HCE8P7PUEtNSyA@mail.gmail.com> <CAATnKFCy0O5tNtSO_d+2TjFU19shvw-oFmYSAP-mD08HSuR=rw@mail.gmail.com> <4F5DA0FE.1070405@gentoo.org> <20120312092711.7dbd969f@pomiocik.lan> Date: Mon, 12 Mar 2012 21:39:52 +1300 Message-ID: <CAATnKFAAXE-v33akcGyVDvmgPBUuDf6T7zUwdoniUto9d31Dpw@mail.gmail.com> Subject: Re: [gentoo-dev] RFD: EAPI specification in ebuilds From: Kent Fredric <kentfredric@gmail.com> To: gentoo-dev@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: df914708-9016-4dcc-94c5-a8dcf7fee840 X-Archives-Hash: e8ca3269b39f779d6abd751e824ca2f1 On 12 March 2012 21:27, Micha=C5=82 G=C3=B3rny <mgorny@gentoo.org> wrote: > And we could just use a good regex for that instead. > > Something like: [eE][aA][pP][iI] <whitespace-or-symbols> [a-z0-9-+]+ > > and just require users for this to be the first thing declared in > an ebuild. Of course, this could make problems with stuff like: > > # EAPI 4 because of foobarbaz > EAPI=3D4 > > (on the other hand, in this particular case it will fetch '4' anyway). > > And this will work as well with: > > <eapi>15-xml</eapi> > > and > > - eapi: 15-yaml > Also, remember the proposal is to read it only from the first 10-30 lines of the file, and if you're *generating* YAML/XML , then this is not necessarily guaranteed. Some generation tools emit keys in alphanumeric ordering, others psuedo-randomly, and the EAPI declaration line in some formats could easily be on the very last line of the file. And then the regexp could falsely detect something in another key the original author had not intended as an EAPI definition, but merely a comment, ... ie: <generateddata> <comment> This is a user comment, hurr, I hate EAPI 5 </comment> <eapi value=3D"15" /> </generateddata> --=20 Kent perl -e=C2=A0 "print substr( \"edrgmaM=C2=A0 SPA NOcomil.ic\\@tfrken\", \$_= * 3, 3 ) for ( 9,8,0,7,1,6,5,4,3,2 );"