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 1SA6go-0005sY-MZ for garchives@archives.gentoo.org; Tue, 20 Mar 2012 21:33:58 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AA0C3E080A; Tue, 20 Mar 2012 21:33:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5C758E0712 for ; Tue, 20 Mar 2012 21:33:07 +0000 (UTC) Received: from mail-qc0-f181.google.com (mail-qc0-f181.google.com [209.85.216.181]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id 41FF31B4065 for ; Tue, 20 Mar 2012 21:33:06 +0000 (UTC) Received: by qcsk26 with SMTP id k26so280848qcs.40 for ; Tue, 20 Mar 2012 14:33:04 -0700 (PDT) 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.224.179.78 with SMTP id bp14mr3055108qab.6.1332279184396; Tue, 20 Mar 2012 14:33:04 -0700 (PDT) Received: by 10.229.214.134 with HTTP; Tue, 20 Mar 2012 14:33:04 -0700 (PDT) In-Reply-To: <20120320182021.711cbf9a@gentoo.org> References: <4F6807A0.5060209@gentoo.org> <201203201741.40501.Arfrever@gentoo.org> <20120320175356.09203956@pomiocik.lan> <201203202035.18234.Arfrever@gentoo.org> <20120320175729.77213f6e@gentoo.org> <20120320180517.29836436@gentoo.org> <20120320182021.711cbf9a@gentoo.org> Date: Tue, 20 Mar 2012 17:33:04 -0400 Message-ID: Subject: Re: [gentoo-dev] Fix spurious dep to eselect-python From: Mike Gilbert To: gentoo-dev@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: fa1184e5-2a2f-42e5-9f4b-9b5f1202fbc3 X-Archives-Hash: 22574201f6bdc74a221011bf176b32fc On Tue, Mar 20, 2012 at 5:20 PM, Alexis Ballier wrote= : > On Tue, 20 Mar 2012 17:09:55 -0400 > Mike Gilbert wrote: > >> On Tue, Mar 20, 2012 at 5:05 PM, Alexis Ballier >> wrote: >> > On Tue, 20 Mar 2012 17:57:29 -0300 >> > Alexis Ballier wrote: >> > >> >> On Tue, 20 Mar 2012 20:35:17 +0100 >> >> Arfrever Frehtes Taifersar Arahesis wrote: >> >> >> >> > 2012-03-20 17:53:56 Micha=C5=82 G=C3=B3rny napisa=C5=82(a): >> >> > > On Tue, 20 Mar 2012 17:41:39 +0100 >> >> > > Arfrever Frehtes Taifersar Arahesis >> >> > > wrote: >> >> > > >> >> > > > 2012-03-20 05:29:20 Luca Barbato napisa=C5=82(a): >> >> > > > > Hi, I tried to avoid depending on eselect-python if the >> >> > > > > useflag is disabled. >> >> > > > > >> >> > > > > Please test and review. >> >> > > > >> >> > > > The proper fix is to make python.eclass add dependency on >> >> > > > app-admin/eselect-python only when ${CATEGORY}/${PN} is >> >> > > > dev-lang/python, dev-java/jython or dev-python/pypy. See bug >> >> > > > #341037. >> >> > > >> >> > > Couldn't we just push that dependency to the specific ebuilds? >> >> > >> >> > We want to control required version (>=3D20091230 in case of >> >> > app-admin/eselect-python) in 1 place. >> >> > >> >> >> >> this can be achieved by setting a variable that said ebuilds will >> >> append to (R)DEPEND; no need for complex 'if then else' on CAT/PN >> >> in an eclass for this. >> >> >> > >> > or also by adding a new python-implementation.eclass instead of >> > polluting an eclass used by hundreds of packages for only 3 special >> > ones... >> > >> >> A four-way if-then statement is not what I would call "complex". This >> was already present in the eclass anyway, so there is no additional >> "pollution". > > a four-way if-then with pattern matching / strcmp is slower than a > constant variable assignment; it could matter when this is done > everytime an ebuild inheriting it is sourced. it probably doesnt, but > imho, its good practice to keep global scope code in eclasses as simple > as possible. > Ah right. It is now being executed in global scope, so there is a slight performance degradation there. Point taken.