Gentoo Archives: gentoo-dev

From: Brian Harring <ferringb@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: FEATURES use or misuse?
Date: Thu, 05 Nov 2009 05:04:14
Message-Id: 20091105050401.GC25976@hrair
In Reply to: [gentoo-dev] Re: FEATURES use or misuse? by Peter Hjalmarsson
1 On Wed, Nov 04, 2009 at 11:12:05PM +0100, Peter Hjalmarsson wrote:
2 > tis 2009-11-03 klockan 16:48 +0100 skrev Patrick Lauer:
3 > > Hi there,
4 > >
5 > > All of these bugs were for the use of the FEATURES variable in ebuilds, which
6 > > is a very convenient thing to work around issues.
7 > > For example known failures with FEATURE="distcc" or funky things like test
8 > > failures with FEATURES="userpriv" and so on. All other methods of expressing
9 > > that are much more verbose and inherently sucky.
10 >
11 > I ask myself if what we really want is many different and strange
12 > approaches to handle FEATURES?
13 > Would it not be better to actually expand some eclasses to be able to
14 > say something about your build environment?
15
16 This is a *really* bad approach- pkgcore/paludis have supported
17 standalone repositories basically from their inception, portage (via
18 repos.conf) has developed equivalent support, and from the looks of it
19 is moving towards such capabilities.
20
21 What this means is that eclasses aren't automatically mashed together
22 across all trees and shared. Meaning each repository would have to
23 carry those eclasses, or require that they always be slaved against a
24 specific repository carrying said eclasses (again, bad mojo).
25
26 The code duplication there is annoying, but the potential range of
27 screwups this can lead to is even worse. Further, via proper
28 environment saving/restoration for installed pkgs/binpkgs, this means
29 that one screwed up FEATURES detection (or that things have changed
30 since then and a new check is required) lives on forever, no
31 possibility of being updated/fixed in the env dump.
32
33 Shorter version, eclasses are a fun idea at first until you dig in and
34 realize they'll blow your leg off for things like this.
35
36 If it's any consolation, I proposed moving large chunks of eapi0
37 (prior to eapi existing) into the tree- the idea died off for the same
38 reasons your "FEATURE awareness in eclasses" must die off.
39
40 ~harring