Gentoo Archives: gentoo-portage-dev

From: Brian Harring <ferringb@×××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Moving ebuild-related where they belong
Date: Thu, 07 Sep 2006 17:44:35
Message-Id: 20060907174236.GE31255@seldon
In Reply to: Re: [gentoo-portage-dev] Moving ebuild-related where they belong by Zac Medico
1 On Thu, Sep 07, 2006 at 10:22:38AM -0700, Zac Medico wrote:
2 > Simon Stelling wrote:
3 > > Zac Medico wrote:
4 > >> Well, if the metadata generation step is viewed as being separate from the rest,
5 > >> and the helpers aren't needed during that step, then it's possible to get the
6 > >> EAPI from the ebuild without the helpers being in the environment. Once the
7 > >> EAPI is known, the package manager can use that to determine what else (if
8 > >> anthing) needs to be added to the environment. Then you'd only need a way to
9 > >> tell the package manager which EAPI levels the functions in your
10 > >> install-helpers.eclass (or whatever) apply to.
11 > >
12 > > That is a workaround, but it makes a pretty hard link between the
13 > > package manager and the functions, which is exactly what I am trying to
14 > > cut through with the patch. Sure, it'd be a workaround, but just keeping
15 > > them in the portage package until EAPI=1 is reached is one too...
16 >
17 > It's not intended as a workaround and it shouldn't create a hard link between
18 > the package manager and the functions. The idea is that the tree should provide
19 > the necessary information for the package manager (portage or not) to determine
20 > how it should setup the environment for a given EAPI. The file containing the
21 > functions from install-helpers.eclass would have to be labeled in some way such
22 > that any package manager would know that those functions are required when
23 > EAPI=0 (and possible other EAPI levels).
24
25 Just so we're clear... if gentoo-x86 wants to define their own base
26 template all ebuilds in that repo use, that's fine. That's a
27 different beast from moving the format definition into the tree
28 though.
29
30 Kind of curious if either of you have thought through the implications
31 of moving this functionality into the tree for the vdb and binpkgs
32 also (short version, even with ebds env handling its not going to be
33 pretty for backwards compatibility).
34
35 > >>>> So, the correct way to do it is to define an EAPI=1 that does no longer
36 > >>>> include these helper functions and make the eclasses/ebuilds that use it
37 > >>>> inherit the eclass manually. However, this will need to run through -dev
38 > >>>> and I'm afraid the ebuild devs wouldn't like it at all :-/
39 > >> They won't like it because it's expected that EAPI will provide the necessary
40 > >> information. Why should they have to inherit some special eclass if it's
41 > >> already implied by the EAPI that they've specified?
42 > >
43 > > It wouldn't be implied anymore. The install-helpers.eclass would
44 > > actually be like every other eclass, like eutils fex.
45 >
46 > Fine, but the EAPI can still be used to imply that some other functions may or
47 > may not be available.
48
49 Not really. Via moving parts of the format into gentoo-x86 it's
50 implciitly setting it up such that whatever tree portage is working
51 against now defines EAPI.
52
53 Sounds whacky, but think it through; instead of trying to verify that
54 3 package managers are EAPI compliant, it's now dependant on the
55 environment the tree defines, as such the tree can redefine the env
56 without bumping the EAPI.
57
58 Yes that's stupid to do, but moving the format into the tree enables
59 it. Theres a reason no other package format has their actual format
60 definitions (env setup in our case) shoved into the repo, and thats
61 one of them.
62
63 > > Actually, the reason they won't like it for will more likely be that it
64 > > requires adding another eclass to the inherit line for ~15'000 ebuilds.
65 >
66 > See, that statement shows me that you've missed my point that EAPI can be used
67 > to imply which functions are implicitly available. It would be redundant to
68 > inherit an eclass containing functions that are already implied by the EAPI.
69
70 Would require 24,600 (last count) mods to ebuilds to specify an elib
71 import moreso; automagically trying to import an elib out of a
72 repository is pretty much guranteed to not behave as desired (overlays
73 again come to mind).
74
75 Eclasses are designed as crappy oop; what this change means for
76 eclasses/elibs is that instead of reusing functionality, functionality
77 gets copy/pasted across repositories- not a good thing.
78
79 ~harring

Replies