Gentoo Archives: gentoo-dev

From: Chris Gianelloni <wolf31o2@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: Place of EAPI variable in ebuild
Date: Wed, 14 Nov 2007 00:21:58
Message-Id: 1194999479.8302.57.camel@inertia.twi-31o2.org
In Reply to: Re: [gentoo-dev] RFC: Place of EAPI variable in ebuild by Ciaran McCreesh
1 On Tue, 2007-11-13 at 20:31 +0000, Ciaran McCreesh wrote:
2 > That was only the case because previously, using new features that
3 > Portage didn't support would cause horrible breakage. Now, instead, the
4 > ebuilds show up as being masked.
5
6 ...which is just as good as "broken" when it happens to a new user first
7 installing Gentoo and wondering why he can't even follow the directions
8 in the Handbook.
9
10 What brought me to bring this up was the mention of changing of eclasses
11 which support a large number of ebuilds, effectively masking a
12 significant portion of the tree from our users. Let's say that I added
13 EAPI=1 to eutils.eclass because I wanted to use some new EAPI=1 feature
14 in one of the functions. Guess what? I've now managed to mask
15 *portage* for users of older portage versions. In fact, I've managed to
16 mask paludis and pkgcore, too. Yes, this is an extreme example. Yes,
17 it is completely possible. Yes, that user would be completely screwed.
18
19 > > Now, this isn't so much of an issue with individual ebuilds, but
20 > > you're talking about changing how the Java eclasses work, essentially
21 > > blocking *anyone* using an older portage (including everyone
22 > > installing from 2007.0 media) from using any package which inherits
23 > > the eclass.
24 >
25 > They just need to upgrade their package manager first. Easy.
26
27 Expecting users to do pretty much anything on their own is broken
28 behavior and should not be relied on for package manager compatibility.
29
30 > > Also, we should really think about this sort of thing before we start
31 > > using it. How are we going to support EAPI changes in eclasses? What
32 > > if I have an eclass with EAPI=1 features and I want to add some EAPI=2
33 > > features? I think allowing EAPI=* globally in an eclass should be
34 > > prohibited, unless the *entire* eclass is planned for EAPI=* ebuilds,
35 > > only.
36 >
37 > Doing an entire eclass for one specific EAPI generally isn't a good idea
38 > since it's fairly likely that EAPI bumps will be a fairly common thing.
39 >
40 > > In other words, you'd need new EAPI=1 eclasses for your EAPI=1
41 > > ebuilds. Either that, or some way to say something like: "execute
42 > > code path A for EAPI=0 and execute code path B for EAPI=1" or
43 > > something similar. I would suspect that the "best" current solution
44 > > is to check EAPI in the individual functions and perform the right
45 > > actions based on those functions, rather than marking an entire
46 > > eclass. After all, only EAPI=* functions need to be "hidden" behind
47 > > EAPI.
48 >
49 > A solution with EAPI-agnostic code in foo-common.eclass and
50 > EAPI-specific code in foo.eclass, foo-eapi1.eclass etc is probably more
51 > readable and maintainable in most cases.
52
53 Umm... So in the paragraph above, you say an EAPI-specific eclass isn't
54 a good idea, and here you push it as the proposed solution. Huh?
55 Consistency, please...
56
57 I guess my real point is that we need to be *really* careful when using
58 this stuff. It is *not* as simple as you make it out to sound. All it
59 takes is one person adding an EAPI into an eclass somewhere to
60 completely screw over a *huge* number of our users. I am just trying to
61 point this out and hopefully get discussion going on how to utilize
62 these great new features without potentially causing damage to our
63 user's machines and our reputation.
64
65 I still think that EAPI should not be allowed to be set in an eclass
66 globally. All I can see is it causing problems for tons of users who
67 don't have a clue what is happening to their systems.
68
69 --
70 Chris Gianelloni
71 Release Engineering Strategic Lead
72 Alpha/AMD64/x86 Architecture Teams
73 Games Developer/Foundation Trustee
74 Gentoo Foundation

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] RFC: Place of EAPI variable in ebuild Ciaran McCreesh <ciaran.mccreesh@×××××××××××××.uk>