/[gentoo]/xml/htdocs/proj/en/glep/glep-0021.html
Gentoo

Contents of /xml/htdocs/proj/en/glep/glep-0021.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download) (as text)
Sat Apr 21 03:13:16 2007 UTC (7 years, 5 months ago) by antarus
Branch: MAIN
Changes since 1.5: +3 -3 lines
File MIME type: text/html
Two gleps are Rejected, a bunch moving from Draft -> Deferred since no one is working on them

1 <?xml version="1.0" encoding="utf-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <!--
5 This HTML is auto-generated. DO NOT EDIT THIS FILE! If you are writing a new
6 PEP, see http://www.python.org/peps/pep-0001.html for instructions and links
7 to templates. DO NOT USE THIS HTML FILE AS YOUR TEMPLATE!
8 -->
9 <head>
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
11 <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
12 <title>GLEP 21 -- User-defined Package Sets</title>
13 <style type="text/css">
14
15 /*
16 :Author: David Goodger
17 :Contact: goodger@users.sourceforge.net
18 :date: $Date: 2007/01/25 03:25:53 $
19 :version: $Revision: 1.5 $
20 :copyright: This stylesheet has been placed in the public domain.
21
22 Default cascading style sheet for the PEP HTML output of Docutils.
23 */
24
25 .first {
26 margin-top: 0 }
27
28 .last {
29 margin-bottom: 0 }
30
31 .navigation {
32 width: 100% ;
33 background: #cc99ff ;
34 margin-top: 0px ;
35 margin-bottom: 0px }
36
37 .navigation .navicon {
38 width: 150px ;
39 height: 35px }
40
41 .navigation .textlinks {
42 padding-left: 1em ;
43 text-align: left }
44
45 .navigation td, .navigation th {
46 padding-left: 0em ;
47 padding-right: 0em ;
48 vertical-align: middle }
49
50 .rfc2822 {
51 margin-top: 0.5em ;
52 margin-left: 0.5em ;
53 margin-right: 0.5em ;
54 margin-bottom: 0em }
55
56 .rfc2822 td {
57 text-align: left }
58
59 .rfc2822 th.field-name {
60 text-align: right ;
61 font-family: sans-serif ;
62 padding-right: 0.5em ;
63 font-weight: bold ;
64 margin-bottom: 0em }
65
66 a.toc-backref {
67 text-decoration: none ;
68 color: black }
69
70 body {
71 margin: 0px ;
72 margin-bottom: 1em ;
73 padding: 0px }
74
75 dd {
76 margin-bottom: 0.5em }
77
78 div.section {
79 margin-left: 1em ;
80 margin-right: 1em ;
81 margin-bottom: 1.5em }
82
83 div.section div.section {
84 margin-left: 0em ;
85 margin-right: 0em ;
86 margin-top: 1.5em }
87
88 div.abstract {
89 margin: 2em 5em }
90
91 div.abstract p.topic-title {
92 font-weight: bold ;
93 text-align: center }
94
95 div.attention, div.caution, div.danger, div.error, div.hint,
96 div.important, div.note, div.tip, div.warning {
97 margin: 2em ;
98 border: medium outset ;
99 padding: 1em }
100
101 div.attention p.admonition-title, div.caution p.admonition-title,
102 div.danger p.admonition-title, div.error p.admonition-title,
103 div.warning p.admonition-title {
104 color: red ;
105 font-weight: bold ;
106 font-family: sans-serif }
107
108 div.hint p.admonition-title, div.important p.admonition-title,
109 div.note p.admonition-title, div.tip p.admonition-title {
110 font-weight: bold ;
111 font-family: sans-serif }
112
113 div.figure {
114 margin-left: 2em }
115
116 div.footer, div.header {
117 font-size: smaller }
118
119 div.footer {
120 margin-left: 1em ;
121 margin-right: 1em }
122
123 div.system-messages {
124 margin: 5em }
125
126 div.system-messages h1 {
127 color: red }
128
129 div.system-message {
130 border: medium outset ;
131 padding: 1em }
132
133 div.system-message p.system-message-title {
134 color: red ;
135 font-weight: bold }
136
137 div.topic {
138 margin: 2em }
139
140 h1 {
141 font-family: sans-serif ;
142 font-size: large }
143
144 h2 {
145 font-family: sans-serif ;
146 font-size: medium }
147
148 h3 {
149 font-family: sans-serif ;
150 font-size: small }
151
152 h4 {
153 font-family: sans-serif ;
154 font-style: italic ;
155 font-size: small }
156
157 h5 {
158 font-family: sans-serif;
159 font-size: x-small }
160
161 h6 {
162 font-family: sans-serif;
163 font-style: italic ;
164 font-size: x-small }
165
166 .section hr {
167 width: 75% }
168
169 ol.simple, ul.simple {
170 margin-bottom: 1em }
171
172 ol.arabic {
173 list-style: decimal }
174
175 ol.loweralpha {
176 list-style: lower-alpha }
177
178 ol.upperalpha {
179 list-style: upper-alpha }
180
181 ol.lowerroman {
182 list-style: lower-roman }
183
184 ol.upperroman {
185 list-style: upper-roman }
186
187 p.caption {
188 font-style: italic }
189
190 p.credits {
191 font-style: italic ;
192 font-size: smaller }
193
194 p.label {
195 white-space: nowrap }
196
197 p.topic-title {
198 font-family: sans-serif ;
199 font-weight: bold }
200
201 pre.line-block {
202 font-family: serif ;
203 font-size: 100% }
204
205 pre.literal-block, pre.doctest-block {
206 margin-left: 2em ;
207 margin-right: 2em ;
208 background-color: #eeeeee }
209
210 span.classifier {
211 font-family: sans-serif ;
212 font-style: oblique }
213
214 span.classifier-delimiter {
215 font-family: sans-serif ;
216 font-weight: bold }
217
218 span.interpreted {
219 font-family: sans-serif }
220
221 span.option-argument {
222 font-style: italic }
223
224 span.pre {
225 white-space: pre }
226
227 span.problematic {
228 color: red }
229
230 table {
231 margin-top: 0.5em ;
232 margin-bottom: 0.5em }
233
234 td, th {
235 padding-left: 0.5em ;
236 padding-right: 0.5em ;
237 vertical-align: top }
238
239 td.num {
240 text-align: right }
241
242 th.field-name {
243 font-weight: bold ;
244 text-align: left ;
245 white-space: nowrap }
246
247 h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
248 font-size: 100% }
249
250 tt {
251 background-color: #eeeeee }
252
253 ul.auto-toc {
254 list-style-type: none }
255
256 </style>
257 </head>
258 <body bgcolor="white">
259 <table class="navigation" cellpadding="0" cellspacing="0"
260 width="100%" border="0">
261 <tr><td class="navicon" width="150" height="35">
262 <a href="http://www.gentoo.org/" title="Gentoo Linux Home Page">
263 <img src="http://www.gentoo.org/images/gentoo-new.gif" alt="[Gentoo]"
264 border="0" width="150" height="35" /></a></td>
265 <td class="textlinks" align="left">
266 [<b><a href="http://www.gentoo.org/">Gentoo Linux Home</a></b>]
267 [<b><a href="http://www.gentoo.org/proj/en/glep/">GLEP Index</a></b>]
268 [<b><a href="http://www.gentoo.org/proj/en/glep/glep-0021.txt">GLEP Source</a></b>]
269 </td></tr></table>
270 <table class="rfc2822 docutils field-list" frame="void" rules="none">
271 <col class="field-name" />
272 <col class="field-body" />
273 <tbody valign="top">
274 <tr class="field"><th class="field-name">GLEP:</th><td class="field-body">21</td>
275 </tr>
276 <tr class="field"><th class="field-name">Title:</th><td class="field-body">User-defined Package Sets</td>
277 </tr>
278 <tr class="field"><th class="field-name">Version:</th><td class="field-body">1.3</td>
279 </tr>
280 <tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference" href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/proj/en/glep/glep-0021.txt?cvsroot=gentoo">2006/09/04 03:06:32</a></td>
281 </tr>
282 <tr class="field"><th class="field-name">Author:</th><td class="field-body">Tal Peer &lt;coredumb&#32;&#97;t&#32;gentoo.org&gt;,
283 Alec Warner &lt;antarus&#32;&#97;t&#32;gentoo.org&gt;</td>
284 </tr>
285 <tr class="field"><th class="field-name">Status:</th><td class="field-body">Deferred</td>
286 </tr>
287 <tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td>
288 </tr>
289 <tr class="field"><th class="field-name">Discussed-To:</th><td class="field-body"><a class="reference" href="mailto:gentoo-portage-dev&#64;lists.gentoo.org">gentoo-portage-dev&#64;lists.gentoo.org</a></td>
290 </tr>
291 <tr class="field"><th class="field-name">Content-Type:</th><td class="field-body"><a class="reference" href="glep-0002.html">text/x-rst</a></td>
292 </tr>
293 <tr class="field"><th class="field-name">Created:</th><td class="field-body">22-Feb-2004</td>
294 </tr>
295 <tr class="field"><th class="field-name">Post-History:</th><td class="field-body">6-Mar-2004, 3-Sep-2006</td>
296 </tr>
297 </tbody>
298 </table>
299 <hr />
300 <div class="contents topic">
301 <p class="topic-title first"><a id="contents" name="contents">Contents</a></p>
302 <ul class="simple">
303 <li><a class="reference" href="#status" id="id3" name="id3">Status</a></li>
304 <li><a class="reference" href="#abstract" id="id4" name="id4">Abstract</a></li>
305 <li><a class="reference" href="#motivation" id="id5" name="id5">Motivation</a></li>
306 <li><a class="reference" href="#specification" id="id6" name="id6">Specification</a><ul>
307 <li><a class="reference" href="#using-user-defined-sets-with-emerge" id="id7" name="id7">Using User-defined Sets With Emerge</a></li>
308 <li><a class="reference" href="#compatibility-with-other-portage-features" id="id8" name="id8">Compatibility With Other Portage Features</a></li>
309 </ul>
310 </li>
311 <li><a class="reference" href="#implementation" id="id9" name="id9">Implementation</a></li>
312 <li><a class="reference" href="#rationale" id="id10" name="id10">Rationale</a></li>
313 <li><a class="reference" href="#backwards-compatibility" id="id11" name="id11">Backwards Compatibility</a></li>
314 <li><a class="reference" href="#references" id="id12" name="id12">References</a></li>
315 <li><a class="reference" href="#copyright" id="id13" name="id13">Copyright</a></li>
316 </ul>
317 </div>
318 <div class="section">
319 <h1><a class="toc-backref" href="#id3" id="status" name="status">Status</a></h1>
320 <p>Taken over by antarus.</p>
321 </div>
322 <div class="section">
323 <h1><a class="toc-backref" href="#id4" id="abstract" name="abstract">Abstract</a></h1>
324 <p>In Portage, package sets (formerly known as 'classes' or 'targets')
325 are mere groups of packages, grouped together to allow easier updating
326 and handling of them. Currently it is impossible to define sets further
327 than the two default ones: &quot;system&quot; and &quot;world&quot;.</p>
328 </div>
329 <div class="section">
330 <h1><a class="toc-backref" href="#id5" id="motivation" name="motivation">Motivation</a></h1>
331 <p>Over the months, quite a few requests for user-defined sets were
332 made by users and developers, either by posting bugs, messages to
333 mailing lists or on IRC. Usually the response is that this is an
334 awesome idea, but no one ever took the time to actually define it
335 properly and implement it.</p>
336 <p>This document offers a specification for the implementation of
337 user-defined sets using configuration files similar to the current
338 world/system sets use.</p>
339 </div>
340 <div class="section">
341 <h1><a class="toc-backref" href="#id6" id="specification" name="specification">Specification</a></h1>
342 <p>The proposed implementation uses a one file per set approach, meaning
343 each package set is defined in a single file. All set definition files
344 will reside in a directory <tt class="docutils literal"><span class="pre">/etc/portage/sets/</span></tt> and each set's name
345 will be its file name. Therefore, if one defines a set in
346 /etc/portage/sets/foo-set, the set name will be 'foo-set'. Usual
347 package naming rules <a class="footnote-reference" href="#name-rules" id="id1" name="id1">[1]</a> also apply to sets.</p>
348 <p>As it is impossible to create two or more files with identical names
349 in the same directory, a theoretic conflict between two different sets
350 sharing the same name is impossible. However, users may define a
351 package set whose name conflicts with one more or packages (for ambiguity
352 resolution, see below).</p>
353 <p>Syntax for the package list file is the same as the world file syntax,
354 as described in the Portage manpage <a class="footnote-reference" href="#portage-manpage" id="id2" name="id2">[2]</a>, with one
355 addition: sets may not be 'inherited' by other sets, only packages may
356 be listed. There is no limitation to the number of packages in a set
357 or to the number of sets a package may belong to.</p>
358 <div class="section">
359 <h2><a class="toc-backref" href="#id7" id="using-user-defined-sets-with-emerge" name="using-user-defined-sets-with-emerge">Using User-defined Sets With Emerge</a></h2>
360 <p>The user-defined sets will be available either directly or using
361 the --package-set option, As in:</p>
362 <pre class="literal-block">
363 # Basically the same:
364 emerge foo-set
365 emerge --package-set foo-set
366 </pre>
367 <p>The --package-set option is introduced to bypass ambiguities, as
368 illustrated in the next example:</p>
369 <pre class="literal-block">
370 emerge foo # Where foo is both a set and a one or more
371 # existing packages. This will cause emerge to show
372 # the ambiguity, ask us to be more
373 # specific, and stop.
374
375 emerge --package-set foo # So we specify that what we actually
376 # meant was the package set.
377
378 emerge cat-bar/foo # Or we specify the exact package name.
379 </pre>
380 <p>When running emerge with the --pretend option, sets will be
381 expanded to the packages they are comprised off in the output, as with
382 the current system-defined sets.</p>
383 <p>Only one set may be passed to portage at time, and sets can not
384 be mixed with ordinary packages. Thus, the following snippets are
385 all invalid and will result in an error (assuming <tt class="docutils literal"><span class="pre">foo-set</span></tt> and
386 <tt class="docutils literal"><span class="pre">bar-set</span></tt> are defined as sets):</p>
387 <pre class="literal-block">
388 emerge foo-set glibc
389 emerge bar-set system
390 emerge world foo-set gcc
391 </pre>
392 </div>
393 <div class="section">
394 <h2><a class="toc-backref" href="#id8" id="compatibility-with-other-portage-features" name="compatibility-with-other-portage-features">Compatibility With Other Portage Features</a></h2>
395 <ul class="simple">
396 <li>Dependencies:
397 Package sets (both system-defined and user-defined) may not be
398 depended on by ordinary packages and eclasses.</li>
399 <li>package.mask:
400 Masking a package set through the <tt class="docutils literal"><span class="pre">package.mask</span></tt> file is forbidden.
401 In order to 'mask' a package set, one should move it away from the
402 sets directory.</li>
403 <li>package.use:
404 USE flags may not be defined for sets in the <tt class="docutils literal"><span class="pre">package.use</span></tt> file.</li>
405 </ul>
406 </div>
407 </div>
408 <div class="section">
409 <h1><a class="toc-backref" href="#id9" id="implementation" name="implementation">Implementation</a></h1>
410 <p>The implementation of the package sets concept in Portage should be
411 mostly done in portage.py, and only the interface parts should be
412 added to emerge itself, to keep the separation between interface and
413 logic.</p>
414 <p>The amount of work needed for implementation is not trivial, but not
415 huge either.</p>
416 </div>
417 <div class="section">
418 <h1><a class="toc-backref" href="#id10" id="rationale" name="rationale">Rationale</a></h1>
419 <p>The one file per set approach makes it easy to list the sets which are
420 defined on a system by just listing the <tt class="docutils literal"><span class="pre">/etc/portage/sets</span></tt>
421 directory contents. Additionally, it makes the set lookup process more
422 efficient as it only requires to check if a file exists.</p>
423 <p>I chose the --package-set option over the --set option for explicitly
424 telling portage to emerge a set mostly because --set implies setting
425 an environment variable, or such.</p>
426 <p>Allowing sets' USE flags to be manipulated through the <tt class="docutils literal"><span class="pre">package.use</span></tt>
427 file would have done more harm than good, for several reasons:</p>
428 <ul class="simple">
429 <li>If a USE flag is turned on (i.e. 'foo') for a set and the same USE
430 flag is turned off (i.e. '-foo'), for a package which is part of
431 the set, it is unclear which setting should take precedence.</li>
432 <li>Similarly, if a USE flag is turned on for a set and the same USE flag
433 is turned off for a set that is a subset of the original set, it is
434 unclear which setting should take precedence.</li>
435 <li>If a USE flag is defined (either off or on) for a set and a package
436 that belongs in the set is to be emerged, it is unclear whether the
437 USE flag should be defined when emerging the package in question.</li>
438 </ul>
439 <p>Therefore, I have decided it would be better to disallow setting USE
440 flags for sets.</p>
441 </div>
442 <div class="section">
443 <h1><a class="toc-backref" href="#id11" id="backwards-compatibility" name="backwards-compatibility">Backwards Compatibility</a></h1>
444 <p>Backwards compatibility with the current situation, in which only two
445 system-defined sets exist can be kept in one of two ways:</p>
446 <ol class="arabic simple">
447 <li>Leaving the situation as is - the 'world' and 'system' sets are
448 hard-coded in Portage.</li>
449 <li>Distributing default 'system' and 'world' files under the
450 <tt class="docutils literal"><span class="pre">/etc/portage/sets/</span></tt> directory.</li>
451 </ol>
452 <p>Other than that, there are no other backwards compatibility concerns
453 involved.</p>
454 </div>
455 <div class="section">
456 <h1><a class="toc-backref" href="#id12" id="references" name="references">References</a></h1>
457 <table class="docutils footnote" frame="void" id="name-rules" rules="none">
458 <colgroup><col class="label" /><col /></colgroup>
459 <tbody valign="top">
460 <tr><td class="label"><a class="fn-backref" href="#id1" name="name-rules">[1]</a></td><td>Gentoo Linux Development Policy - Ebuild Policy
461 (<a class="reference" href="http://www.gentoo.org/doc/en/policy.xml#doc_chap3">http://www.gentoo.org/doc/en/policy.xml#doc_chap3</a>)</td></tr>
462 </tbody>
463 </table>
464 <table class="docutils footnote" frame="void" id="portage-manpage" rules="none">
465 <colgroup><col class="label" /><col /></colgroup>
466 <tbody valign="top">
467 <tr><td class="label"><a class="fn-backref" href="#id2" name="portage-manpage">[2]</a></td><td><a class="reference" href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/portage/man/portage.5?root=gentoo-src">http://www.gentoo.org/cgi-bin/viewcvs.cgi/portage/man/portage.5?root=gentoo-src</a></td></tr>
468 </tbody>
469 </table>
470 </div>
471 <div class="section">
472 <h1><a class="toc-backref" href="#id13" id="copyright" name="copyright">Copyright</a></h1>
473 <p>This document has been placed in the public domain.</p>
474 </div>
475
476 </div>
477 <div class="footer">
478 <hr class="footer" />
479 <a class="reference" href="glep-0021.txt">View document source</a>.
480 Generated on: 2006-10-10 20:23 UTC.
481 Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
482
483 </div>
484 </body>
485 </html>

  ViewVC Help
Powered by ViewVC 1.1.20