Gentoo Archives: gentoo-dev

From: Alexis Ballier <aballier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Fix spurious dep to eselect-python
Date: Tue, 20 Mar 2012 21:21:14
Message-Id: 20120320182021.711cbf9a@gentoo.org
In Reply to: Re: [gentoo-dev] Fix spurious dep to eselect-python by Mike Gilbert
1 On Tue, 20 Mar 2012 17:09:55 -0400
2 Mike Gilbert <floppym@g.o> wrote:
3
4 > On Tue, Mar 20, 2012 at 5:05 PM, Alexis Ballier <aballier@g.o>
5 > wrote:
6 > > On Tue, 20 Mar 2012 17:57:29 -0300
7 > > Alexis Ballier <aballier@g.o> wrote:
8 > >
9 > >> On Tue, 20 Mar 2012 20:35:17 +0100
10 > >> Arfrever Frehtes Taifersar Arahesis <arfrever@g.o> wrote:
11 > >>
12 > >> > 2012-03-20 17:53:56 Michał Górny napisał(a):
13 > >> > > On Tue, 20 Mar 2012 17:41:39 +0100
14 > >> > > Arfrever Frehtes Taifersar Arahesis <arfrever@g.o>
15 > >> > > wrote:
16 > >> > >
17 > >> > > > 2012-03-20 05:29:20 Luca Barbato napisał(a):
18 > >> > > > > Hi, I tried to avoid depending on eselect-python if the
19 > >> > > > > useflag is disabled.
20 > >> > > > >
21 > >> > > > > Please test and review.
22 > >> > > >
23 > >> > > > The proper fix is to make python.eclass add dependency on
24 > >> > > > app-admin/eselect-python only when ${CATEGORY}/${PN} is
25 > >> > > > dev-lang/python, dev-java/jython or dev-python/pypy. See bug
26 > >> > > > #341037.
27 > >> > >
28 > >> > > Couldn't we just push that dependency to the specific ebuilds?
29 > >> >
30 > >> > We want to control required version (>=20091230 in case of
31 > >> > app-admin/eselect-python) in 1 place.
32 > >> >
33 > >>
34 > >> this can be achieved by setting a variable that said ebuilds will
35 > >> append to (R)DEPEND; no need for complex 'if then else' on CAT/PN
36 > >> in an eclass for this.
37 > >>
38 > >
39 > > or also by adding a new python-implementation.eclass instead of
40 > > polluting an eclass used by hundreds of packages for only 3 special
41 > > ones...
42 > >
43 >
44 > A four-way if-then statement is not what I would call "complex". This
45 > was already present in the eclass anyway, so there is no additional
46 > "pollution".
47
48 a four-way if-then with pattern matching / strcmp is slower than a
49 constant variable assignment; it could matter when this is done
50 everytime an ebuild inheriting it is sourced. it probably doesnt, but
51 imho, its good practice to keep global scope code in eclasses as simple
52 as possible.

Replies

Subject Author
Re: [gentoo-dev] Fix spurious dep to eselect-python Mike Gilbert <floppym@g.o>