/[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.8 - (show annotations) (download) (as text)
Sun Oct 21 11:42:57 2007 UTC (6 years, 10 months ago) by genone
Branch: MAIN
Changes since 1.7: +255 -5 lines
File MIME type: text/html
update status section to reflect reality

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: 2003/06/02 17:03:08 $
19 :version: $Revision: 1.1 $
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/peps">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.4</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">2007/04/21 03:13:16</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>Abandoned. Package set support has been added in portage-2.2, but it
321 doesn't match the description in this document in many cases, and the
322 document has several major gaps regarding the behavior and restrictions
323 of package sets.</p>
324 </div>
325 <div class="section">
326 <h1><a class="toc-backref" href="#id4" id="abstract" name="abstract">Abstract</a></h1>
327 <p>In Portage, package sets (formerly known as 'classes' or 'targets')
328 are mere groups of packages, grouped together to allow easier updating
329 and handling of them. Currently it is impossible to define sets further
330 than the two default ones: &quot;system&quot; and &quot;world&quot;.</p>
331 </div>
332 <div class="section">
333 <h1><a class="toc-backref" href="#id5" id="motivation" name="motivation">Motivation</a></h1>
334 <p>Over the months, quite a few requests for user-defined sets were
335 made by users and developers, either by posting bugs, messages to
336 mailing lists or on IRC. Usually the response is that this is an
337 awesome idea, but no one ever took the time to actually define it
338 properly and implement it.</p>
339 <p>This document offers a specification for the implementation of
340 user-defined sets using configuration files similar to the current
341 world/system sets use.</p>
342 </div>
343 <div class="section">
344 <h1><a class="toc-backref" href="#id6" id="specification" name="specification">Specification</a></h1>
345 <p>The proposed implementation uses a one file per set approach, meaning
346 each package set is defined in a single file. All set definition files
347 will reside in a directory <tt class="docutils literal"><span class="pre">/etc/portage/sets/</span></tt> and each set's name
348 will be its file name. Therefore, if one defines a set in
349 /etc/portage/sets/foo-set, the set name will be 'foo-set'. Usual
350 package naming rules <a class="footnote-reference" href="#name-rules" id="id1" name="id1">[1]</a> also apply to sets.</p>
351 <p>As it is impossible to create two or more files with identical names
352 in the same directory, a theoretic conflict between two different sets
353 sharing the same name is impossible. However, users may define a
354 package set whose name conflicts with one more or packages (for ambiguity
355 resolution, see below).</p>
356 <p>Syntax for the package list file is the same as the world file syntax,
357 as described in the Portage manpage <a class="footnote-reference" href="#portage-manpage" id="id2" name="id2">[2]</a>, with one
358 addition: sets may not be 'inherited' by other sets, only packages may
359 be listed. There is no limitation to the number of packages in a set
360 or to the number of sets a package may belong to.</p>
361 <div class="section">
362 <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>
363 <p>The user-defined sets will be available either directly or using
364 the --package-set option, As in:</p>
365 <pre class="literal-block">
366 # Basically the same:
367 emerge foo-set
368 emerge --package-set foo-set
369 </pre>
370 <p>The --package-set option is introduced to bypass ambiguities, as
371 illustrated in the next example:</p>
372 <pre class="literal-block">
373 emerge foo # Where foo is both a set and a one or more
374 # existing packages. This will cause emerge to show
375 # the ambiguity, ask us to be more
376 # specific, and stop.
377
378 emerge --package-set foo # So we specify that what we actually
379 # meant was the package set.
380
381 emerge cat-bar/foo # Or we specify the exact package name.
382 </pre>
383 <p>When running emerge with the --pretend option, sets will be
384 expanded to the packages they are comprised off in the output, as with
385 the current system-defined sets.</p>
386 <p>Only one set may be passed to portage at time, and sets can not
387 be mixed with ordinary packages. Thus, the following snippets are
388 all invalid and will result in an error (assuming <tt class="docutils literal"><span class="pre">foo-set</span></tt> and
389 <tt class="docutils literal"><span class="pre">bar-set</span></tt> are defined as sets):</p>
390 <pre class="literal-block">
391 emerge foo-set glibc
392 emerge bar-set system
393 emerge world foo-set gcc
394 </pre>
395 </div>
396 <div class="section">
397 <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>
398 <ul class="simple">
399 <li>Dependencies:
400 Package sets (both system-defined and user-defined) may not be
401 depended on by ordinary packages and eclasses.</li>
402 <li>package.mask:
403 Masking a package set through the <tt class="docutils literal"><span class="pre">package.mask</span></tt> file is forbidden.
404 In order to 'mask' a package set, one should move it away from the
405 sets directory.</li>
406 <li>package.use:
407 USE flags may not be defined for sets in the <tt class="docutils literal"><span class="pre">package.use</span></tt> file.</li>
408 </ul>
409 </div>
410 </div>
411 <div class="section">
412 <h1><a class="toc-backref" href="#id9" id="implementation" name="implementation">Implementation</a></h1>
413 <p>The implementation of the package sets concept in Portage should be
414 mostly done in portage.py, and only the interface parts should be
415 added to emerge itself, to keep the separation between interface and
416 logic.</p>
417 <p>The amount of work needed for implementation is not trivial, but not
418 huge either.</p>
419 </div>
420 <div class="section">
421 <h1><a class="toc-backref" href="#id10" id="rationale" name="rationale">Rationale</a></h1>
422 <p>The one file per set approach makes it easy to list the sets which are
423 defined on a system by just listing the <tt class="docutils literal"><span class="pre">/etc/portage/sets</span></tt>
424 directory contents. Additionally, it makes the set lookup process more
425 efficient as it only requires to check if a file exists.</p>
426 <p>I chose the --package-set option over the --set option for explicitly
427 telling portage to emerge a set mostly because --set implies setting
428 an environment variable, or such.</p>
429 <p>Allowing sets' USE flags to be manipulated through the <tt class="docutils literal"><span class="pre">package.use</span></tt>
430 file would have done more harm than good, for several reasons:</p>
431 <ul class="simple">
432 <li>If a USE flag is turned on (i.e. 'foo') for a set and the same USE
433 flag is turned off (i.e. '-foo'), for a package which is part of
434 the set, it is unclear which setting should take precedence.</li>
435 <li>Similarly, if a USE flag is turned on for a set and the same USE flag
436 is turned off for a set that is a subset of the original set, it is
437 unclear which setting should take precedence.</li>
438 <li>If a USE flag is defined (either off or on) for a set and a package
439 that belongs in the set is to be emerged, it is unclear whether the
440 USE flag should be defined when emerging the package in question.</li>
441 </ul>
442 <p>Therefore, I have decided it would be better to disallow setting USE
443 flags for sets.</p>
444 </div>
445 <div class="section">
446 <h1><a class="toc-backref" href="#id11" id="backwards-compatibility" name="backwards-compatibility">Backwards Compatibility</a></h1>
447 <p>Backwards compatibility with the current situation, in which only two
448 system-defined sets exist can be kept in one of two ways:</p>
449 <ol class="arabic simple">
450 <li>Leaving the situation as is - the 'world' and 'system' sets are
451 hard-coded in Portage.</li>
452 <li>Distributing default 'system' and 'world' files under the
453 <tt class="docutils literal"><span class="pre">/etc/portage/sets/</span></tt> directory.</li>
454 </ol>
455 <p>Other than that, there are no other backwards compatibility concerns
456 involved.</p>
457 </div>
458 <div class="section">
459 <h1><a class="toc-backref" href="#id12" id="references" name="references">References</a></h1>
460 <table class="docutils footnote" frame="void" id="name-rules" rules="none">
461 <colgroup><col class="label" /><col /></colgroup>
462 <tbody valign="top">
463 <tr><td class="label"><a class="fn-backref" href="#id1" name="name-rules">[1]</a></td><td>Gentoo Linux Development Policy - Ebuild Policy
464 (<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>
465 </tbody>
466 </table>
467 <table class="docutils footnote" frame="void" id="portage-manpage" rules="none">
468 <colgroup><col class="label" /><col /></colgroup>
469 <tbody valign="top">
470 <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>
471 </tbody>
472 </table>
473 </div>
474 <div class="section">
475 <h1><a class="toc-backref" href="#id13" id="copyright" name="copyright">Copyright</a></h1>
476 <p>This document has been placed in the public domain.</p>
477 </div>
478
479 </div>
480 <div class="footer">
481 <hr class="footer" />
482 <a class="reference" href="glep-0021.txt">View document source</a>.
483 Generated on: 2007-10-21 11:40 UTC.
484 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.
485
486 </div>
487 </body>
488 </html>

  ViewVC Help
Powered by ViewVC 1.1.20