Gentoo Archives: gentoo-ppc-user

From: Calum Selkirk <cselkirk@×××××.com>
To: gentooppc-user@g.o
Subject: [gentooppc-user] Fwd: Re: [gentoo-user] RFC: KDE 'child' packages - new direction
Date: Mon, 13 May 2002 21:42:01
Message-Id: 20020514023919.GB791@panix.com
1 ----- Forwarded message from Dan Armak <danarmak@g.o> -----
2
3 > Date: Mon, 13 May 2002 21:31:33 +0300
4 > From: Dan Armak <danarmak@g.o>
5 > Reply-To: gentoo-user@g.o
6 > To: gentoo-user@g.o, gentoo-dev@g.o
7 > Subject: Re: [gentoo-user] RFC: KDE 'child' packages - new direction
8 > X-Mailer: KMail [version 1.4]
9
10 > Hello everyone,
11 >
12 > My RFC turned up many proponents as wellas opponents of the change. After an
13 > irc discussion with the other gentoo developers, we've decided to introduce
14 > generic "subpackage" support into portage. (Or try).
15 >
16 > It will take some time, and so won't be available with kde-3.0.1 (which should
17 > be released Wednesday or Thursday, according to the original plans). But, it
18 > will solve everything in the best way possible, enabling flexible subpackages
19 > (in an even better way than my original idea) while eliminating the multiple
20 > configure runs problem.
21 >
22 > Here's the porposal I'm posting on gentoo-core (a private developer list):
23 >
24 > To bring everyone up to speed:
25 > KDE child packages as implemented so far have one big disadvantage for people
26 > who want to emerge all of kde: the configure script has to be run for every
27 > child packages, resulting in a big overhead (1-2 minutes to run the script,
28 > 20-40 child packages per parent --> extra hours of compilnig time).
29 >
30 > I asked on -dev and -user how good/bad such a tradeoff would be, and responses
31 > have been quite mixed so far. Not quite balanced but nearly so (more people
32 > don't care about compile time and/or want modular packages).
33 >
34 > New proposal: "subpackages", much as described in the portage.py header
35 > comments. Note that I'm not talking about "dev,run,..." subpackages mentioned
36 > there, but about separating e.g. kdenetwork into kmail, kppp, knode... But of
37 > course any ebuild could create any subpackages it wanted.
38 >
39 > Description:
40 > Portage-related side:
41 > 1a. An ebuild sets $SUBPACKAGELIST to a list of the subpackages it has. (Not
42 > to confuse with $SUBPACKAGES below. Someone suggest a better pair of names
43 > please!)
44 >
45 > 1b. We'll probably want subpackages to have revisions independant of their
46 > master ebuild, so that they can be updated separately. This should be
47 > specified here as well. Like this:
48 > SUBPACKAGELIST="foo1 foo2-r1 foo3-r4" (foo1 is at r0)
49 > Or any other way that'll be more comfortable for the python side to process.
50 > Maybe with a char that can't be a part of an ebuild name, like so:
51 > SUBPACKAGELIST="foo1:0 foo2:1 foo3:4"
52 > Or similar.
53 >
54 > 2. A user can call "emerge kdenetwork:kmail,knode..." (maybe even "ebuild
55 > kdenetwork:this,that,... action"?). A dep can also contain such a string.
56 >
57 > 3. The ebuild is processed in the standard fashion; a variable $SUBPACKAGES is
58 > made available to it to indicate the subpackages requested. The ebuild is
59 > then responsible for building and installing the packages indicated. (My
60 > kde-child -based ebuilds can do it already.)
61 >
62 > 4a. In src_install, each subpackage 'foo''s files go into ${D}/foo/.
63 > Or:
64 > 4b. As proposed in the portage.py comments, there's an src_subpkg() function
65 > that does:
66 > subpkg foo # set grab's subpackage to foo
67 > grap files/*.so # register these files as belonging to subpackage foo
68 > grap foodir # grab a directory recursively
69 >
70 > 5. In /var/db/pkg/category, a record "package:subpackage" is made for every
71 > subpackage appropriately. If I "emerge kdenetwork", records for all
72 > subpackages will be created.
73 >
74 > Summary: this is excellent AFAICS. It will be easier to implement ebuild-wise
75 > than child ebuilds (since no new separate ebuilds need be created), it won't
76 > force people to run configure more than once when not necessary, etc.
77 >
78 > Summary of portage-side changes required:
79 > - master:foo1,foo2... support in emerge command lines and dependency strings,
80 > with $SUBPACKAGES provided to the ebuild.
81 > - master:foo subpackage registration in /var/db/pkg with $SUBPACKAGELIST from
82 > the ebuild taken into account (e.g. if all subpackages have been merged, a
83 > dependency on the master ebuild is satisifed; if only some have been merged,
84 > the master ebuild is called with the complementing $SUBPACKAGES).
85 > - support of src_subpkg() and subpkg() and grab() functions.
86 >
87 > Ebuild-wise, I'll be ready a day or two after the release of such a portage.
88 > Most of the work has already been done.
89 >
90 > Comments welcome!
91 >