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 ) id 1M5GAj-0000sD-EC for garchives@archives.gentoo.org; Sat, 16 May 2009 09:27:13 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EC12EE03AB; Sat, 16 May 2009 09:27:11 +0000 (UTC) Received: from eric.schwarzvogel.de (eric.schwarzvogel.de [194.97.4.250]) by pigeon.gentoo.org (Postfix) with ESMTP id C1E7FE03AB for ; Sat, 16 May 2009 09:27:11 +0000 (UTC) Received: from klausman by eric.schwarzvogel.de with local (Exim 4.69) (envelope-from ) id 1M5GAg-00020a-JO for gentoo-dev@lists.gentoo.org; Sat, 16 May 2009 11:27:10 +0200 Date: Sat, 16 May 2009 11:27:10 +0200 From: Tobias Klausmann To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] The fallacies of GLEP55 Message-ID: <20090516092710.GA3221@eric.schwarzvogel.de> Mail-Followup-To: gentoo-dev@lists.gentoo.org References: <200905142006.51998.patrick@gentoo.org> <4A0C790A.1050209@gentoo.org> <20090514231623.409c8eb7@gentoo.org> <20090514214909.GA23080@linux1> <20090514225337.34df7dac@snowcone> <20090515194329.GA16382@linux1> <20090515204905.54aa6a5c@snowmobile> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090515204905.54aa6a5c@snowmobile> User-Agent: Mutt/1.5.19 (2009-01-05) Sender: Tobias Klausmann X-Archives-Salt: e2220307-54a4-43e2-8428-82cbd3c77dcf X-Archives-Hash: 16bd3883c57cacb7f1484b9db3c7c31b Hi! On Fri, 15 May 2009, Ciaran McCreesh wrote: > > eval `grep '^EAPI=' ebuildfile | head -n 1` > > > > will set EAPI in the current scope to EAPI in the ebuild, without > > sourcing it, unless the issue with something like this would be its > > use of grep and head, but these are both in the system set, so unless > > you don't want to depend on the system set, I don't know what the > > objection would be. > > The objection is that your code doesn't work. It's entirely legal to > do, say: > > export EAPI="1" Change the spec, then. Or aren't we talking about writing/changing/clarifying a spec right now? I mean... yes, ebuilds are actually bash scripts. But I don't see a problem with using a subset of what's allowed for *this* *specific* line. Actually, I personally would prefer taking it out of the parsed-by-bash part entirely. Add it as a shebang-like line at the top: #EAPI-1 as the first or second line. Allowing it on the second line allows you to later bolt on a true shebang-line if you should so desire. Only having to look at the first two lines makes finding it out easier (note that I don't call that parsing on purpose). > or: > > inherit versionator > > if version_is_at_least 2 ; then > EAPI="2" > else > EAPI="0" > fi I was under the impression that it's illegal to change/set the EAPI after using inherit. Regards, Tobias -- Found on a small utility knife in MIT's lab supply: "Caution. Blade is sharp. Keep out of children."