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 1S5apY-0003Ip-99 for garchives@archives.gentoo.org; Thu, 08 Mar 2012 10:44:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 270D0E0698; Thu, 8 Mar 2012 08:14:32 +0000 (UTC) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by pigeon.gentoo.org (Postfix) with ESMTP id B33D5E0761 for ; Thu, 8 Mar 2012 08:13:43 +0000 (UTC) Received: by wico1 with SMTP id o1so147826wic.40 for ; Thu, 08 Mar 2012 00:13:42 -0800 (PST) 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 Received: by 10.180.102.129 with SMTP id fo1mr10458586wib.6.1331194422692; Thu, 08 Mar 2012 00:13:42 -0800 (PST) Sender: antarus@scriptkitty.com Received: by 10.227.5.138 with HTTP; Thu, 8 Mar 2012 00:13:42 -0800 (PST) In-Reply-To: <20312.24445.451487.577826@a1i15.kph.uni-mainz.de> References: <20311.51166.725757.212932@a1i15.kph.uni-mainz.de> <20312.24445.451487.577826@a1i15.kph.uni-mainz.de> Date: Thu, 8 Mar 2012 00:13:42 -0800 X-Google-Sender-Auth: NhK5KboxlkP0ZHuWO3FQtV0z70o Message-ID: Subject: Re: [gentoo-dev] RFD: EAPI specification in ebuilds From: Alec Warner To: gentoo-dev@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmbph1V2Sz6+yIHM48hAyOPued+GR9tV0yVlryLUobUZjrMetKVESu7acdQuSw/Gz16rNyR X-Archives-Salt: 397f5ffe-b55a-45c3-8b54-001994af1826 X-Archives-Hash: 7633b8a425d88d11261bed1f13a4b8a1 On Wed, Mar 7, 2012 at 11:27 PM, Ulrich Mueller wrote: >>>>>> On Wed, 7 Mar 2012, Alec Warner wrote: > >>> *** Proposal 1: "Parse the EAPI assignment statement" *** >>> [...] > >> I don't like this idea because the sane way should be easy and >> straightforward. Mixing a constant declaration with bash assignment >> just confuses users who think the assignment is full bash when in >> fact it is not. > >> EAPI=$(somefunc) >> EAPI=${SOMEVAR%%-*} >> and so forth all don't meet the regex (and would be flagged >> invalid.) However a naive author might think they work. > > Such constructs also cannot be used with any of the other proposed > solutions. And in fact, nobody is using such things in practice. > _All_ ebuilds in the Portage tree can be successfully parsed with the > regexp proposed. I'm not saying they are valid EAPI syntax; but they are all valid bash. I tend to assume all authors are as...ignorant as myself. Lets not give them the rope to hang themselves. > > The obvious sanity check, i.e. comparing the EAPI obtained by parsing > and by sourcing, could be added to repoman, which would prevent such > non-conforming ebuilds from being committed to the tree. > >>> *** Proposal 2: "EAPI in header comment" *** >>> [...] > >> Overloading is bad. > >> There is no real difference between: >> #!/usr/bin/ebuild --eapi 5 >> # EAPI=5 > >> The problem is that the former is also the way to specify how to >> execute the ebuild; so unless you plan to make ebuilds executable and >> having /usr/bin/ebuild provide the ebuild environment, using that >> syntax is confusing to users. > > I agree with this point. > > Many file formats are identifying themselves with a magic token (as > it is used by sys-apps/file), but it is not necessarily a shebang. > > Ulrich >