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 1S61e5-0000oI-RS for garchives@archives.gentoo.org; Fri, 09 Mar 2012 15:22:18 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C6DC9E089C; Fri, 9 Mar 2012 15:22:08 +0000 (UTC) Received: from mail2.viabit.com (mail2.viabit.com [65.246.80.16]) by pigeon.gentoo.org (Postfix) with ESMTP id B1923E0850 for ; Fri, 9 Mar 2012 15:21:38 +0000 (UTC) Received: from [10.1.1.204] (unknown [65.213.236.244]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail2.viabit.com (Postfix) with ESMTPSA id 3B3ACD8DEB for ; Fri, 9 Mar 2012 10:21:38 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=orlitzky.com; s=mail2; t=1331306498; bh=783EzpsDI+YV0M5DGHXliQEsp7uxsq8ZketT7CtVk4c=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=eJFOchK2HOO7efXgxgQ+f8Q0E/5s3/AeC891bYNrD4du7+BiQ1hltt90XKpoh0iPT bLTxZnDLE/ItZPy9N7FGIRB4xgou8M1vO9ONvo2dbM/KSVM3QIwUmTaFTfDO34f5oN h+F1+c7wTa7HtCIKDZU+3Xr6Va8XFQ/tQ9+biarg= Message-ID: <4F5A2001.30309@orlitzky.com> Date: Fri, 09 Mar 2012 10:21:37 -0500 From: Michael Orlitzky User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20120116 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> <4F592612.6050203@orlitzky.com> <20120309060424.09cdce1e@pomiocik.lan> <4F599692.9050503@orlitzky.com> <4F599A61.8010600@gentoo.org> <4F5A16C5.7050303@orlitzky.com> <4F5A1C46.7080005@gentoo.org> In-Reply-To: <4F5A1C46.7080005@gentoo.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: 328f1dca-897a-42c1-9feb-cdfdd3902452 X-Archives-Hash: 46353ef6c1fbab79dc369ce4a8295a95 On 03/09/12 10:05, Zac Medico wrote: >> >> Surely we can source one or two lines of the ebuild safely, like the >> example shows? > > Why would we though, when sourcing is a relatively costly operation, and > there are much more efficient ways to get the EAPI? There do not seem to be any that people agree on =) I mean, it's /easy/ to get the EAPI. There's a list of ways on the GLEP, but all of them have trade-offs. The header comment seems to be the preference in this thread. The advantage that the eapi function has over a comment is that it's not magic -- it's just normal bash syntax. So we've addressed that issue at a small performance cost (we're really only sourcing the ebuild up to 'exit'). Whether or not that trade-off is worth it, who knows. I would prefer to make it work before we make it fast; but new ideas can't hurt considering nobody has agreed on an old one. > Also, you've got a chicken and egg problem, since you're assuming that > your eapi() function is going to be available in the global environment > when the ebuild is sourced. The whole point of knowing the EAPI in > advance is so that we will be able to make changes to the global > environment, such as add, remove, or change the behavior of _any_ function. Nah, at the top of the ebuild, you would have, EAPI=5 eapi 5 until package managers catch up, just like we would have to do with the comment. Once they've caught up, we can drop the EAPI= assignment, and begin using new features after the call to 'eapi'.