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 1S7e7T-0001cN-17 for garchives@archives.gentoo.org; Wed, 14 Mar 2012 02:39:23 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F1248E0CB8; Wed, 14 Mar 2012 02:39:00 +0000 (UTC) Received: from mail-iy0-f181.google.com (mail-iy0-f181.google.com [209.85.210.181]) by pigeon.gentoo.org (Postfix) with ESMTP id A3C33E0CB1 for ; Wed, 14 Mar 2012 02:38:17 +0000 (UTC) Received: by iaoo28 with SMTP id o28so2086420iao.40 for ; Tue, 13 Mar 2012 19:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=HceEp0NINLpaMvrkMtxMRPP4f9dGC4xQTuuESBfn5Qw=; b=g519lLvd3V/pmtxiHWjjHMOLWaK0LJ0/dPT83j/5hA4gQvyEWGpEBbZUySbrGO3Nvc 8ysr3dfVFv2B2gNnFhP4RyLDLzXEpjJEhcTE9+hCFxL8rrlT9XsUGIk4P6CBER0y1PAz eJ3Jz7is8XNi4tnlgrK/SlhIJ5gk0bi5QCU68NxMoVA4bnR3heRr5a5Zx+0jWZOATnpi VA1S2MRjB4FqCiKdvhjhJynJSgqVDBg81mnqiVq37D9/AKL6LcfBO8sgcMwW7tbegdYD g9srMctLNFG34ihcpcd2JcpImnT9jqFa2F/+GTaKk7569nu7A0vGIoeiMrwjTJd9gz46 0IAw== Received: by 10.42.150.200 with SMTP id b8mr1052386icw.43.1331692697249; Tue, 13 Mar 2012 19:38:17 -0700 (PDT) Received: from smtp.gmail.com:587 (74-95-192-101-SFBA.hfc.comcastbusiness.net. [74.95.192.101]) by mx.google.com with ESMTPS id hy6sm13053971igc.12.2012.03.13.19.38.14 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Mar 2012 19:38:16 -0700 (PDT) Received: by smtp.gmail.com:587 (sSMTP sendmail emulation); Tue, 13 Mar 2012 19:38:14 -0700 Date: Tue, 13 Mar 2012 19:38:14 -0700 From: Brian Harring To: Zac Medico Cc: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] RFD : .ebuild is only bash Message-ID: <20120314023814.GC7731@localhost> References: <20120312155927.2cca0d3b@googlemail.com> <20318.11498.463319.52140@a1i15.kph.uni-mainz.de> <20120312171228.48c5b023@googlemail.com> <20120313064113.GA23544@waltdnes.org> <20120313073022.0781099c@googlemail.com> <20120314002903.GA2872@waltdnes.org> <20120314014231.GA7731@localhost> <4F5FFD05.2010801@gentoo.org> 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: <4F5FFD05.2010801@gentoo.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Archives-Salt: 78b33e40-fd56-4f2d-81f9-cf1b5eec58d6 X-Archives-Hash: 10d147df63c0db4bd78ff57b6160d898 On Tue, Mar 13, 2012 at 07:05:57PM -0700, Zac Medico wrote: > On 03/13/2012 06:42 PM, Brian Harring wrote: > > Leaving it such that the PM has to enforce things like "don't have > > multiple EAPI assignments" means by default, one of them isn't going > > to... leading to the ebuilds breaking... specifically the common case > > being the ebuild becoming acclimated to some quirk of portage. > > My intention is for PMS to specify the search algorithm that's used to > probe the EAPI, and also for it to specify that package managers must > treat an ebuild as invalid if the probed EAPI is not identical to the > one that's obtained from bash. *Now* is when you should be applying your KISS wikipedia links (moreso, the principle applied to your proposal). What you're talking about is requiring PMs to monitor what occured and bail- rather than precluding it from even occuring. I repeat; try to spot the situation and make things blow up, rather than disallowing it from occuring in the first place. It's really that simple; this is why the "grep the assignment" out of the source is at its core, a well intentioned but fundamentally bad idea. It's glue on a bad situation rather than just removing the bad situation. > If all package managers adhere strictly > to these two requirements, then we won't have any incompatibilities > between package managers here. You're missing a lot of the point here; defining some search algo is basically screwed at its core due to the flexibility of bash. Simple example: if [ "$PV" -eq 9999 ]; then EAPI=3 else EAPI=2 fi The flexibility of bash means that your attempt to enforce simplistic rules like "it must be greppable" are at loggerheads; if the rules were "last is the one thats used", then I just invert the if check. Yep, the above is stupid code. Frankly, the sort of stupid code I'd expect out of a newbie ebuild dev. The EAPI bit there is synthetic, but that sort of construct (putting everything into a single file, then using symlinks to expose differing versions) is out in the wild and used. The fact that potential exists is a flat out sign the approach is broken. Worse, it's a way to trip up people- specifically new devs who don't know fun rules like "the PM has this lovely search algo for getting EAPI that you must abide by". ~brian