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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 Revision 1.7
1<?xml version="1.0" encoding="utf-8" ?> 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"> 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"> 3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<!-- 4
5This HTML is auto-generated. DO NOT EDIT THIS FILE! If you are writing a new
6PEP, see http://www.python.org/peps/pep-0001.html for instructions and links
7to templates. DO NOT USE THIS HTML FILE AS YOUR TEMPLATE!
8-->
9<head> 5<head>
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
11 <meta name="generator" content="Docutils 0.3.0: http://docutils.sourceforge.net/" /> 7 <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
12 <title>GLEP 21 -- User-defined Package Sets</title> 8 <title>GLEP 21 -- User-defined Package Sets</title>
13 <link rel="stylesheet" href="tools/glep.css" type="text/css" /> 9 <link rel="stylesheet" href="tools/glep.css" type="text/css" />
14</head> 10</head>
15<body bgcolor="white"> 11<body bgcolor="white">
16<table class="navigation" cellpadding="0" cellspacing="0" 12<table class="navigation" cellpadding="0" cellspacing="0"
22<td class="textlinks" align="left"> 18<td class="textlinks" align="left">
23[<b><a href="http://www.gentoo.org/">Gentoo Linux Home</a></b>] 19[<b><a href="http://www.gentoo.org/">Gentoo Linux Home</a></b>]
24[<b><a href="http://www.gentoo.org/proj/en/glep">GLEP Index</a></b>] 20[<b><a href="http://www.gentoo.org/proj/en/glep">GLEP Index</a></b>]
25[<b><a href="http://www.gentoo.org/proj/en/glep/glep-0021.txt">GLEP Source</a></b>] 21[<b><a href="http://www.gentoo.org/proj/en/glep/glep-0021.txt">GLEP Source</a></b>]
26</td></tr></table> 22</td></tr></table>
27<div class="document">
28<table class="rfc2822 field-list" frame="void" rules="none"> 23<table class="rfc2822 docutils field-list" frame="void" rules="none">
29<col class="field-name" /> 24<col class="field-name" />
30<col class="field-body" /> 25<col class="field-body" />
31<tbody valign="top"> 26<tbody valign="top">
32<tr class="field"><th class="field-name">GLEP:</th><td class="field-body">21</td> 27<tr class="field"><th class="field-name">GLEP:</th><td class="field-body">21</td>
33</tr> 28</tr>
34<tr class="field"><th class="field-name">Title:</th><td class="field-body">User-defined Package Sets</td> 29<tr class="field"><th class="field-name">Title:</th><td class="field-body">User-defined Package Sets</td>
35</tr> 30</tr>
36<tr class="field"><th class="field-name">Version:</th><td class="field-body">1.2</td> 31<tr class="field"><th class="field-name">Version:</th><td class="field-body">1.4</td>
37</tr> 32</tr>
38<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">2004/03/07 23:20:54</a></td> 33<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>
39</tr> 34</tr>
40<tr class="field"><th class="field-name">Author:</th><td class="field-body">Tal Peer &lt;coredumb&#32;&#97;t&#32;gentoo.org&gt;</td> 35<tr class="field"><th class="field-name">Author:</th><td class="field-body">Tal Peer &lt;coredumb&#32;&#97;t&#32;gentoo.org&gt;,
36Alec Warner &lt;antarus&#32;&#97;t&#32;gentoo.org&gt;</td>
41</tr> 37</tr>
42<tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td> 38<tr class="field"><th class="field-name">Status:</th><td class="field-body">Deferred</td>
43</tr> 39</tr>
44<tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td> 40<tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td>
45</tr> 41</tr>
46<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> 42<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>
47</tr> 43</tr>
48<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> 44<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>
49</tr> 45</tr>
50<tr class="field"><th class="field-name">Created:</th><td class="field-body">22-Feb-2004</td> 46<tr class="field"><th class="field-name">Created:</th><td class="field-body">22-Feb-2004</td>
51</tr> 47</tr>
52<tr class="field"><th class="field-name">Post-History:</th><td class="field-body">6-Mar-2004</td> 48<tr class="field"><th class="field-name">Post-History:</th><td class="field-body">6-Mar-2004, 3-Sep-2006</td>
53</tr> 49</tr>
54</tbody> 50</tbody>
55</table> 51</table>
56<hr /> 52<hr />
57<div class="contents topic" id="contents"> 53<div class="contents topic">
58<p class="topic-title"><a name="contents">Contents</a></p> 54<p class="topic-title first"><a id="contents" name="contents">Contents</a></p>
59<ul class="simple"> 55<ul class="simple">
56<li><a class="reference" href="#status" id="id3" name="id3">Status</a></li>
60<li><a class="reference" href="#abstract" id="id3" name="id3">Abstract</a></li> 57<li><a class="reference" href="#abstract" id="id4" name="id4">Abstract</a></li>
61<li><a class="reference" href="#motivation" id="id4" name="id4">Motivation</a></li> 58<li><a class="reference" href="#motivation" id="id5" name="id5">Motivation</a></li>
62<li><a class="reference" href="#specification" id="id5" name="id5">Specification</a><ul> 59<li><a class="reference" href="#specification" id="id6" name="id6">Specification</a><ul>
63<li><a class="reference" href="#using-user-defined-sets-with-emerge" id="id6" name="id6">Using User-defined Sets With Emerge</a></li> 60<li><a class="reference" href="#using-user-defined-sets-with-emerge" id="id7" name="id7">Using User-defined Sets With Emerge</a></li>
64<li><a class="reference" href="#compatibility-with-other-portage-features" id="id7" name="id7">Compatibility With Other Portage Features</a></li> 61<li><a class="reference" href="#compatibility-with-other-portage-features" id="id8" name="id8">Compatibility With Other Portage Features</a></li>
65</ul> 62</ul>
66</li> 63</li>
67<li><a class="reference" href="#implementation" id="id8" name="id8">Implementation</a></li> 64<li><a class="reference" href="#implementation" id="id9" name="id9">Implementation</a></li>
68<li><a class="reference" href="#rationale" id="id9" name="id9">Rationale</a></li> 65<li><a class="reference" href="#rationale" id="id10" name="id10">Rationale</a></li>
69<li><a class="reference" href="#backwards-compatibility" id="id10" name="id10">Backwards Compatibility</a></li> 66<li><a class="reference" href="#backwards-compatibility" id="id11" name="id11">Backwards Compatibility</a></li>
70<li><a class="reference" href="#references" id="id11" name="id11">References</a></li> 67<li><a class="reference" href="#references" id="id12" name="id12">References</a></li>
71<li><a class="reference" href="#copyright" id="id12" name="id12">Copyright</a></li> 68<li><a class="reference" href="#copyright" id="id13" name="id13">Copyright</a></li>
72</ul> 69</ul>
73</div> 70</div>
74<div class="section" id="abstract"> 71<div class="section">
72<h1><a class="toc-backref" href="#id3" id="status" name="status">Status</a></h1>
73<p>Taken over by antarus.</p>
74</div>
75<div class="section">
75<h1><a class="toc-backref" href="#id3" name="abstract">Abstract</a></h1> 76<h1><a class="toc-backref" href="#id4" id="abstract" name="abstract">Abstract</a></h1>
76<p>In Portage, package sets (formerly known as 'classes' or 'targets') 77<p>In Portage, package sets (formerly known as 'classes' or 'targets')
77are mere groups of packages, grouped together to allow easier updating 78are mere groups of packages, grouped together to allow easier updating
78and handling of them. Currently it is impossible to define sets further 79and handling of them. Currently it is impossible to define sets further
79than the two default ones: &quot;system&quot; and &quot;world&quot;.</p> 80than the two default ones: &quot;system&quot; and &quot;world&quot;.</p>
80</div> 81</div>
81<div class="section" id="motivation"> 82<div class="section">
82<h1><a class="toc-backref" href="#id4" name="motivation">Motivation</a></h1> 83<h1><a class="toc-backref" href="#id5" id="motivation" name="motivation">Motivation</a></h1>
83<p>Over the months, quite a few requests for user-defined sets were 84<p>Over the months, quite a few requests for user-defined sets were
84made by users and developers, either by posting bugs, messages to 85made by users and developers, either by posting bugs, messages to
85mailing lists or on IRC. Usually the response is that this is an 86mailing lists or on IRC. Usually the response is that this is an
86awesome idea, but no one ever took the time to actually define it 87awesome idea, but no one ever took the time to actually define it
87properly and implement it.</p> 88properly and implement it.</p>
88<p>This document offers a specification for the implementation of 89<p>This document offers a specification for the implementation of
89user-defined sets using configuration files similar to the current 90user-defined sets using configuration files similar to the current
90world/system sets use.</p> 91world/system sets use.</p>
91</div> 92</div>
92<div class="section" id="specification"> 93<div class="section">
93<h1><a class="toc-backref" href="#id5" name="specification">Specification</a></h1> 94<h1><a class="toc-backref" href="#id6" id="specification" name="specification">Specification</a></h1>
94<p>The proposed implementation uses a one file per set approach, meaning 95<p>The proposed implementation uses a one file per set approach, meaning
95each package set is defined in a single file. All set definition files 96each package set is defined in a single file. All set definition files
96will reside in a directory <tt class="literal"><span class="pre">/etc/portage/sets/</span></tt> and each set's name 97will reside in a directory <tt class="docutils literal"><span class="pre">/etc/portage/sets/</span></tt> and each set's name
97will be its file name. Therefore, if one defines a set in 98will be its file name. Therefore, if one defines a set in
98/etc/portage/sets/foo-set, the set name will be 'foo-set'. Usual 99/etc/portage/sets/foo-set, the set name will be 'foo-set'. Usual
99package naming rules <a class="footnote-reference" href="#name-rules" id="id1" name="id1">[1]</a> also apply to sets.</p> 100package naming rules <a class="footnote-reference" href="#name-rules" id="id1" name="id1">[1]</a> also apply to sets.</p>
100<p>As it is impossible to create two or more files with identical names 101<p>As it is impossible to create two or more files with identical names
101in the same directory, a theoretic conflict between two different sets 102in the same directory, a theoretic conflict between two different sets
105<p>Syntax for the package list file is the same as the world file syntax, 106<p>Syntax for the package list file is the same as the world file syntax,
106as described in the Portage manpage <a class="footnote-reference" href="#portage-manpage" id="id2" name="id2">[2]</a>, with one 107as described in the Portage manpage <a class="footnote-reference" href="#portage-manpage" id="id2" name="id2">[2]</a>, with one
107addition: sets may not be 'inherited' by other sets, only packages may 108addition: sets may not be 'inherited' by other sets, only packages may
108be listed. There is no limitation to the number of packages in a set 109be listed. There is no limitation to the number of packages in a set
109or to the number of sets a package may belong to.</p> 110or to the number of sets a package may belong to.</p>
110<div class="section" id="using-user-defined-sets-with-emerge"> 111<div class="section">
111<h2><a class="toc-backref" href="#id6" name="using-user-defined-sets-with-emerge">Using User-defined Sets With Emerge</a></h2> 112<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>
112<p>The user-defined sets will be available either directly or using 113<p>The user-defined sets will be available either directly or using
113the --package-set option, As in:</p> 114the --package-set option, As in:</p>
114<pre class="literal-block"> 115<pre class="literal-block">
115# Basically the same: 116# Basically the same:
116emerge foo-set 117emerge foo-set
132<p>When running emerge with the --pretend option, sets will be 133<p>When running emerge with the --pretend option, sets will be
133expanded to the packages they are comprised off in the output, as with 134expanded to the packages they are comprised off in the output, as with
134the current system-defined sets.</p> 135the current system-defined sets.</p>
135<p>Only one set may be passed to portage at time, and sets can not 136<p>Only one set may be passed to portage at time, and sets can not
136be mixed with ordinary packages. Thus, the following snippets are 137be mixed with ordinary packages. Thus, the following snippets are
137all invalid and will result in an error (assuming <tt class="literal"><span class="pre">foo-set</span></tt> and 138all invalid and will result in an error (assuming <tt class="docutils literal"><span class="pre">foo-set</span></tt> and
138<tt class="literal"><span class="pre">bar-set</span></tt> are defined as sets):</p> 139<tt class="docutils literal"><span class="pre">bar-set</span></tt> are defined as sets):</p>
139<pre class="literal-block"> 140<pre class="literal-block">
140emerge foo-set glibc 141emerge foo-set glibc
141emerge bar-set system 142emerge bar-set system
142emerge world foo-set gcc 143emerge world foo-set gcc
143</pre> 144</pre>
144</div> 145</div>
145<div class="section" id="compatibility-with-other-portage-features"> 146<div class="section">
146<h2><a class="toc-backref" href="#id7" name="compatibility-with-other-portage-features">Compatibility With Other Portage Features</a></h2> 147<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>
147<ul class="simple"> 148<ul class="simple">
148<li>Dependencies: 149<li>Dependencies:
149Package sets (both system-defined and user-defined) may not be 150Package sets (both system-defined and user-defined) may not be
150depended on by ordinary packages and eclasses.</li> 151depended on by ordinary packages and eclasses.</li>
151<li>package.mask: 152<li>package.mask:
152Masking a package set through the <tt class="literal"><span class="pre">package.mask</span></tt> file is forbidden. 153Masking a package set through the <tt class="docutils literal"><span class="pre">package.mask</span></tt> file is forbidden.
153In order to 'mask' a package set, one should move it away from the 154In order to 'mask' a package set, one should move it away from the
154sets directory.</li> 155sets directory.</li>
155<li>package.use: 156<li>package.use:
156USE flags may not be defined for sets in the <tt class="literal"><span class="pre">package.use</span></tt> file.</li> 157USE flags may not be defined for sets in the <tt class="docutils literal"><span class="pre">package.use</span></tt> file.</li>
157</ul> 158</ul>
158</div> 159</div>
159</div> 160</div>
160<div class="section" id="implementation"> 161<div class="section">
161<h1><a class="toc-backref" href="#id8" name="implementation">Implementation</a></h1> 162<h1><a class="toc-backref" href="#id9" id="implementation" name="implementation">Implementation</a></h1>
162<p>The implementation of the package sets concept in Portage should be 163<p>The implementation of the package sets concept in Portage should be
163mostly done in portage.py, and only the interface parts should be 164mostly done in portage.py, and only the interface parts should be
164added to emerge itself, to keep the separation between interface and 165added to emerge itself, to keep the separation between interface and
165logic.</p> 166logic.</p>
166<p>The amount of work needed for implementation is not trivial, but not 167<p>The amount of work needed for implementation is not trivial, but not
167huge either.</p> 168huge either.</p>
168</div> 169</div>
169<div class="section" id="rationale"> 170<div class="section">
170<h1><a class="toc-backref" href="#id9" name="rationale">Rationale</a></h1> 171<h1><a class="toc-backref" href="#id10" id="rationale" name="rationale">Rationale</a></h1>
171<p>The one file per set approach makes it easy to list the sets which are 172<p>The one file per set approach makes it easy to list the sets which are
172defined on a system by just listing the <tt class="literal"><span class="pre">/etc/portage/sets</span></tt> 173defined on a system by just listing the <tt class="docutils literal"><span class="pre">/etc/portage/sets</span></tt>
173directory contents. Additionally, it makes the set lookup process more 174directory contents. Additionally, it makes the set lookup process more
174efficient as it only requires to check if a file exists.</p> 175efficient as it only requires to check if a file exists.</p>
175<p>I chose the --package-set option over the --set option for explicitly 176<p>I chose the --package-set option over the --set option for explicitly
176telling portage to emerge a set mostly because --set implies setting 177telling portage to emerge a set mostly because --set implies setting
177an environment variable, or such.</p> 178an environment variable, or such.</p>
178<p>Allowing sets' USE flags to be manipulated through the <tt class="literal"><span class="pre">package.use</span></tt> 179<p>Allowing sets' USE flags to be manipulated through the <tt class="docutils literal"><span class="pre">package.use</span></tt>
179file would have done more harm than good, for several reasons:</p> 180file would have done more harm than good, for several reasons:</p>
180<ul class="simple"> 181<ul class="simple">
181<li>If a USE flag is turned on (i.e. 'foo') for a set and the same USE 182<li>If a USE flag is turned on (i.e. 'foo') for a set and the same USE
182flag is turned off (i.e. '-foo'), for a package which is part of 183flag is turned off (i.e. '-foo'), for a package which is part of
183the set, it is unclear which setting should take precedence.</li> 184the set, it is unclear which setting should take precedence.</li>
189USE flag should be defined when emerging the package in question.</li> 190USE flag should be defined when emerging the package in question.</li>
190</ul> 191</ul>
191<p>Therefore, I have decided it would be better to disallow setting USE 192<p>Therefore, I have decided it would be better to disallow setting USE
192flags for sets.</p> 193flags for sets.</p>
193</div> 194</div>
194<div class="section" id="backwards-compatibility"> 195<div class="section">
195<h1><a class="toc-backref" href="#id10" name="backwards-compatibility">Backwards Compatibility</a></h1> 196<h1><a class="toc-backref" href="#id11" id="backwards-compatibility" name="backwards-compatibility">Backwards Compatibility</a></h1>
196<p>Backwards compatibility with the current situation, in which only two 197<p>Backwards compatibility with the current situation, in which only two
197system-defined sets exist can be kept in one of two ways:</p> 198system-defined sets exist can be kept in one of two ways:</p>
198<ol class="arabic simple"> 199<ol class="arabic simple">
199<li>Leaving the situation as is - the 'world' and 'system' sets are 200<li>Leaving the situation as is - the 'world' and 'system' sets are
200hard-coded in Portage.</li> 201hard-coded in Portage.</li>
201<li>Distributing default 'system' and 'world' files under the 202<li>Distributing default 'system' and 'world' files under the
202<tt class="literal"><span class="pre">/etc/portage/sets/</span></tt> directory.</li> 203<tt class="docutils literal"><span class="pre">/etc/portage/sets/</span></tt> directory.</li>
203</ol> 204</ol>
204<p>Other than that, there are no other backwards compatibility concerns 205<p>Other than that, there are no other backwards compatibility concerns
205involved.</p> 206involved.</p>
206</div> 207</div>
207<div class="section" id="references"> 208<div class="section">
208<h1><a class="toc-backref" href="#id11" name="references">References</a></h1> 209<h1><a class="toc-backref" href="#id12" id="references" name="references">References</a></h1>
209<table class="footnote" frame="void" id="name-rules" rules="none"> 210<table class="docutils footnote" frame="void" id="name-rules" rules="none">
210<colgroup><col class="label" /><col /></colgroup> 211<colgroup><col class="label" /><col /></colgroup>
211<tbody valign="top"> 212<tbody valign="top">
212<tr><td class="label"><a class="fn-backref" href="#id1" name="name-rules">[1]</a></td><td>Gentoo Linux Development Policy - Ebuild Policy 213<tr><td class="label"><a class="fn-backref" href="#id1" name="name-rules">[1]</a></td><td>Gentoo Linux Development Policy - Ebuild Policy
213(<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> 214(<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>
214</tbody> 215</tbody>
215</table> 216</table>
216<table class="footnote" frame="void" id="portage-manpage" rules="none"> 217<table class="docutils footnote" frame="void" id="portage-manpage" rules="none">
217<colgroup><col class="label" /><col /></colgroup> 218<colgroup><col class="label" /><col /></colgroup>
218<tbody valign="top"> 219<tbody valign="top">
219<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> 220<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>
220</tbody> 221</tbody>
221</table> 222</table>
222</div> 223</div>
223<div class="section" id="copyright"> 224<div class="section">
224<h1><a class="toc-backref" href="#id12" name="copyright">Copyright</a></h1> 225<h1><a class="toc-backref" href="#id13" id="copyright" name="copyright">Copyright</a></h1>
225<p>This document has been placed in the public domain.</p> 226<p>This document has been placed in the public domain.</p>
226</div> 227</div>
227</div>
228 228
229<hr class="footer"/> 229</div>
230<div class="footer"> 230<div class="footer">
231<hr class="footer" />
231<a class="reference" href="glep-0021.txt">View document source</a>. 232<a class="reference" href="glep-0021.txt">View document source</a>.
232Generated on: 2004-03-07 23:20 UTC. 233Generated on: 2007-10-13 13:39 UTC.
233Generated 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. 234Generated 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.
235
234</div> 236</div>
235</body> 237</body>
236</html> 238</html>
237 239

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20