Gentoo Archives: gentoo-dev

From: Brian Harring <ferringb@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] draft glep: multi-repo
Date: Sat, 17 Dec 2005 23:18:48
Message-Id: 20051217231548.GB22142@nightcrawler.e-centre.net
In Reply to: [gentoo-dev] DRAFT GLEP: MULTI-REPO by Andrew Muraco
1 Pardon bluntness; don't mean offense, just specifically picking the
2 hell out of this proposal to make a point (lucky you) :)
3
4 On Sat, Dec 17, 2005 at 03:17:44AM -0500, Andrew Muraco wrote:
5 > Attached is a draft of a glep for formalizing multiple-repository support
6
7 I appreciate trying to chip in, but frankly this glep needs a lot more
8 thought put into it.
9
10 Further, I _really_ do not see the point of glepping this either. Puking
11 up proposals due to folks making noise is a waste of time- don't
12 document/propose just because folks are making noise- do it for
13 large scale changes, or conflict, not because someone requires a
14 glep/spec before they're willing to listen to the _developers_ of a
15 project about how to integrate a new feature into _their_ project.
16
17
18 > This is far from ideal in many ways, but i'm too tired and I drank too
19 > much caffine to be sane.
20 >
21 > Comments, objections, anything consructive is welcome.
22
23 Inlined...
24
25
26 > Abstract
27 > ========
28 > To implement a functional and expandable method for Portage to support multiple repositories.
29 >
30 > Motivation
31 > ==========
32 > Multiple Repository support is needed, this GLEP is to address this need.
33
34 define multiple repository. We _have_ multi repo already
35 (binpkg and portdir, let alone overlays).
36
37
38 > Specification
39 > =============
40 >
41 > Portage will make use of two (2) ways to address repositories:
42 > * A User-defined name, which is likely to be used as a convinance in most situations - this will be referred to as REPO_NAME in this GLEP
43 > * A hard-coded repository-id which will be found in the repository tree at: metadata/repo_id - this will be referred to as REPO_ID in this GLEP
44 > Both names will contain no spaces, and only standard characters [TODO: references]
45
46 Portage externally will use user defined, internally it will do it's
47 own thing.
48
49
50 > Repositories
51 > ------------
52 >
53 > Each repository will contain:
54 > * the repo name in metadata/repo_id
55 > * repo information such as maintainer of the repo, notes on who hosts it, etc will be contained metadata/repo_info
56 > * unique packages.mask which will only apply to ebuilds within that specific repo.
57 >
58 > The REPO_ID must match the name that will be used for rsync
59 > Therefore, rsync://MyServer.tdl/REPO_ID/
60
61 No. It's arbitrary, and invalid to assume rsync is the only sync uri
62 that's going to be used- this isn't even getting into _remote_ repos.
63
64 *ANY* unique id tagged into a repo is just that, a magic constant in
65 it's metadata. Just that. No mandates about SYNC, file layout, etc,
66 will fly that bind to the metadata id.
67
68
69 > /etc/portage/*
70 > -------------
71 >
72 > In order to provide users with the current set of options and extend them so they can be customized to each repository, the structure of /etc/portage
73 > will remain similar with these changes:
74 > * /etc/portage/REPO_NAME/* will be the location of repository-specific portage files.
75 > * /etc/portage/ will continue to function over all repos
76 > ** ex) =sys-devel/gcc-4 -* in /etc/portage/package.keywords would use the latest gcc-4 regardless of what tree it comes from.
77 >
78 > The following new files will be added to /etc/portage:
79 > * /etc/portage/repositories.perfer - will contain each REPO_NAME in order of preferance, higher is more perfered. (Each REPO_NAME will be on a seperate line)
80
81 yuck. This is a bit of a waste for a single file.
82
83
84 > ** In the absence of this file portage should use repositories in alphabetical order.
85
86 directory returned ordering, not alpha- no ordering == set of
87 repositories, thus don't try to induce a fallback ordering.
88
89
90 > * /etc/portage/REPO_NAME/repository.id - contains the specific REPO_ID which REPO_NAME applies to.
91
92 This is going to induce more slowdown for any config instantiation-
93 more directories/files to scan. Iow, python -c 'import portage'
94 (which instantiates a config obj), is going to get slower, which will
95 piss off the slower system folk even further (hell, even with 1.5ghz
96 and decent IO it still is a 10s import for me uncached).
97
98
99 > */etc/portage/REPO_NAME/repository.conf - will contain any repository-specific options, which can include, but is not limited to, FEATURES="" C[XX]FLAGS="".
100 > ** This will also include a new variable; OPTIONS="" of which is similar to FEATURES, but modifies the way portage will handle that specific repository.
101 > A few examples of options which could be useful:
102 This seems a bit arbitrary.
103
104 > *** EXCLUDESYNC - Prevents portage from doing a sync on this repo.
105
106 And how are you going to specify the sync method for that repo?
107
108
109 > *** EXCLUDEUPDATE - Prevents portage from using ebuilds in this repo as updates for packages which currently reside in a different repo.
110 > *** EXCLUSIVEUPDATE - forces any update to any package which is from this repository to a newer version which resides inside of this repo.
111
112 And this is implemented how? Why is it specifying resolver
113 directives as repo attributes?
114
115 When is this forced -U going to be triggered? Sync? Next random
116 emerge call? How is this going to be bound to the resolver, let alone
117 the question of how build configuration data is going to be bound to
118 the actual build? yes, leading question there. :)
119
120 Where in this proposal, is it extending similar capabilities to
121 binpkgs?
122
123
124 > *** et al.
125 >
126 > All of the repository rsync URIs will be stored in /etc/make.conf
127 > SYNC="rsync://myfavoriterepo.org/myportage \ rsync://rsync.namerica.gentoo.org/gentoo-portage"
128
129 No. No no no no no.... at least this explains the metadata ID
130 being part of SYNC comment thought :)
131
132
133 > The Tree: /usr/portage -> /var/repositories/REPO_ID/
134 > ----------------------
135 > The repository tree will need to be moved, each repository will have its own folder: /var/repositories/REPO_ID/.
136
137 This directly castrates the user's ability to store the tree wherever
138 they want, loss of that long standing capability is an issue. No go
139 there.
140
141
142 > For compatibility reasons, /usr/portage will be treated as /var/repositories/gentoo-portage
143
144 Building hacks into portage isn't going to fly; no special cases. The
145 need for this is a sign that the forced FHS compliant path (instead of
146 letting the user do whatever they want) is a bad idea.
147
148 This beast can be accomplished without sacrificing our existing
149 flexibility.
150
151
152 > Ebuilds
153 > -------
154 >
155 > Ebuilds will now be able to have dependencies based on packages from specific repositories.
156 >
157 > * DEP Atoms now support the following format: =REPO_ID:SLOTNUM:CAT/EBUILD-X.Y.Z
158 > ** Ex1) >=MyRepo:2:sys-devel/gcc-4.0
159 > ** Ex2) <gentoo-portage::kde-base/kdelibs-3.5
160 > ** Ex3 ::foo/bar
161 > Dependency atoms that lack the new format (::) or do not have a REPO_ID will then just use any ebuild which fulfills the requirements.
162
163 Backwards compatibility? Protection for portage version that see this
164 and aren't capable of handling it? Why are you proposing the use/slot
165 additions be changed so slot is prefixed rather then postfixed?
166
167
168 > Backwards Compatibility
169 > =======================
170 > /usr/portage will be treated as /var/repositories/gentoo-portage so it would be possible to function with no changes after the upgrade.
171
172 This is a bit short... see above. lot more to it, especially since
173 you're trying to use stable.
174
175 Glep doesn't provide any way for knowing what repo's are active...
176 nor what repo's are overlaying each other, nor extending the
177 capabilties to anything beyond ebuild trees. Bintree? VDB? (yes,
178 extending slaving capabilities to vdb has uses).
179
180 The shortcomings I'm pointing at are historical- you're trying to
181 shoehorn into the existing portage configuration, thus I'm pointing
182 out the failings of it :)
183
184 Basically... this glep is exactly opposite of what I'm after, and what
185 I've already written in saviour. Saviour's configuration *currently*
186 is ini based, although that isn't a requirement (pluggable config parser
187 is there, although marienz is working on making my initial prototype
188 not suck).
189
190 Make.conf support will be there (backwards compatibility);
191 just will require a config parser written to convert make.conf format
192 into the internal config definitions.
193
194 The existing stable configuration is inherintly single master repo
195 set, single configuration, single domain, single root, single sync.
196 There's no groupping in make.conf (nor aux files), thus it's pretty
197 fricking hard to try and make it groupped. Further, no control over
198 the individual objects- no way to specify that a repo is remote fex.
199
200 All the make.conf support would do for saviour crap is translate it
201 into a single domain, single repo + overlays, etc.
202
203 If folks need more power (seperate caches, seperate syncs for repos, N
204 domains/roots...), they need to use a more powerful config format.
205
206 Via ini, you have repo definitions, defining the repo class to use,
207 location (if applicable), host (if applicable), cache reference (cache
208 instance to use, defined via it's own configuration item), slaving,
209 multiplexing together, package.* specifications (state the
210 filepath)... etc. Plus, user label (section label for that repo
211 definition).
212
213 The framework in place allows for a helluva lot more crazy stuff
214 (your own repo classes, say a strict R->L union of repos), I'm just
215 rambling off the obvious targets.
216
217 The configuration parser/handler actually addresses all of this crap
218 on it's own without forcing us to introduce hacks to try and shoehorn
219 N repo's into the current single repo config.
220
221 Old doc of details/intentions,
222 http://dev.gentoo.org/~ferringb/portage/3.0/dev-notes/framework/config.txt
223 .
224
225 It's generalized and flexible- prior to screaming off with his head
226 for the ini usage, please read through
227 http://dev.gentoo.org/~ferringb/portage/3.0/dev-notes ; there are a
228 _lot_ of good reasons, jotting down of intention, layout/design of
229 portage 3, etc.
230
231 Do the reading prior to the screaming ;)
232
233 Either way... here's how it *should* proceed from where I'm sitting.
234 Introduce full PORTDIR capabilities to all repos available- vdb, binpkg,
235 portdir/portdir_overlay. That right there is a major request people
236 have been pushing for, and in doing so the framework gets hammered
237 on/debugged.
238
239 Introducing resolver level constraints (match strictly from this repo)
240 requires atom extension among other things, and introduces it's own
241 class of problems. Introduce the capabilities while treating existing
242 repos as a single repo set, then extend it with what's needed for true
243 stand alone repos.
244
245 Either way, while discussion of standalone repos is good, I'm going to
246 kindly remind y'all that glep42 just needs to pass in a repo id- it's
247 not blocked by anything but minor api changes to portageq so that the
248 portage devs aren't forced to fix someone elses proposal down the
249 line (in the process breaking crap for users when we do so).
250
251 True stand alone repository capabilities aren't required/bound to
252 glep42, all that's required out of glep42 is that the syncing repo id
253 be used now (even if it may seem superfluous). Iow, news *should*
254 work regardless if it's an overlay or a stand alone repo.
255
256 Please keep that in mind.
257 ~harring

Replies

Subject Author
Re: [gentoo-dev] draft glep: multi-repo Ciaran McCreesh <ciaranm@g.o>