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 1S5l0d-0006Fq-JS for garchives@archives.gentoo.org; Thu, 08 Mar 2012 21:36:27 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D5BBDE086E; Thu, 8 Mar 2012 21:36:18 +0000 (UTC) Received: from mail2.viabit.com (mail2.viabit.com [65.246.80.16]) by pigeon.gentoo.org (Postfix) with ESMTP id BAA14E001E for ; Thu, 8 Mar 2012 21:35:32 +0000 (UTC) Received: from [172.17.29.6] (unknown [65.213.236.242]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail2.viabit.com (Postfix) with ESMTPSA id 7AF20D8DEC for ; Thu, 8 Mar 2012 16:35:30 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=orlitzky.com; s=mail2; t=1331242530; bh=jv5H/XwY8Av2cqVcHbLFiWnz0MsEpvKja2268IgWaBQ=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=W5eQxmvRJt1rH3/RZcJA3dRs8z/9aeCjov1JfLaH8+83DPm6WR9HbrC5LY0BzbykX jGmuQer3/uSgrRLS9ufxImjRtToAZdBNkLd8B3BJ/qWICp4PsaQ7Ck5GC79aYGo+WX 7DuXRgsgz+U2vTaOdoZ3svsv6GuAqqDQHQvLT/ro= Message-ID: <4F592612.6050203@orlitzky.com> Date: Thu, 08 Mar 2012 16:35:14 -0500 From: Michael Orlitzky User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20120121 Thunderbird/9.0 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 To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] RFD: EAPI specification in ebuilds References: <20311.51166.725757.212932@a1i15.kph.uni-mainz.de> <4F57DDB5.3090503@orlitzky.com> <20120308130310.69c3c714@pomiocik.lan> <4F58D6A5.7070804@orlitzky.com> <20120308182844.11201771@pomiocik.lan> <4F58F103.5010503@orlitzky.com> <20120308175345.2c4b72ff@googlemail.com> <4F58FC55.7070005@orlitzky.com> <20120308184820.108fc30c@googlemail.com> In-Reply-To: <20120308184820.108fc30c@googlemail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: c735185c-b51f-4731-8433-3db76e1b5b08 X-Archives-Hash: 19467ba36bb92e2bcaa4dec5d6a19b78 On 03/08/2012 01:48 PM, Ciaran McCreesh wrote: > >> If they're code, they're code, and we need to execute them somehow. > > The notion of "execute them somehow" that's used doesn't fit in with > the #! interpreter model. You aren't executing ebuilds via an > interpreter. You're performing an action that involves using the data > and code in an ebuild multiple times and in multiple different ways, > and that may also involve doing the same to an installed package that > is being replaced. > I do understand that; but the fact that the data are computed in an ugly turing-complete language complicates things. Did someone already propose replacing EAPI=foo with a function call akin to inherit? eapi 4 inherit whatever ... the call to eapi() would then set $EAPI accordingly. If the ebuild is being executed directly, it could exit $EAPI; otherwise, it would continue normally. That would give us an interface to the variable, and we wouldn't need to know the EAPI ahead of time to do it as long as it's the first function called in the ebuild. This is of course isomorphic to requiring a specific EAPI=4 format, but does allow you to do stupid things like x=`seq 4 4`; eapi $x; if you want.