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

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

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

Revision 1.7 Revision 1.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
5<head> 5<head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" /> 7 <meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
8 <title>GLEP 54 -- scm package version suffix</title> 8 <title>GLEP 54 -- scm package version suffix</title>
9 <link rel="stylesheet" href="tools/glep.css" type="text/css" /> 9 <link rel="stylesheet" href="tools/glep.css" type="text/css" /></head>
10</head>
11<body bgcolor="white"> 10<body bgcolor="white">
12<table class="navigation" cellpadding="0" cellspacing="0" 11<table class="navigation" cellpadding="0" cellspacing="0"
13 width="100%" border="0"> 12 width="100%" border="0">
14<tr><td class="navicon" width="150" height="35"> 13<tr><td class="navicon" width="150" height="35">
15<a href="http://www.gentoo.org/" title="Gentoo Linux Home Page"> 14<a href="http://www.gentoo.org/" title="Gentoo Linux Home Page">
26<tbody valign="top"> 25<tbody valign="top">
27<tr class="field"><th class="field-name">GLEP:</th><td class="field-body">54</td> 26<tr class="field"><th class="field-name">GLEP:</th><td class="field-body">54</td>
28</tr> 27</tr>
29<tr class="field"><th class="field-name">Title:</th><td class="field-body">scm package version suffix</td> 28<tr class="field"><th class="field-name">Title:</th><td class="field-body">scm package version suffix</td>
30</tr> 29</tr>
31<tr class="field"><th class="field-name">Version:</th><td class="field-body">1.4</td> 30<tr class="field"><th class="field-name">Version:</th><td class="field-body">1.5</td>
32</tr> 31</tr>
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-0054.txt?cvsroot=gentoo">2007/12/17 18:42:33</a></td> 32<tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference external" href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/proj/en/glep/glep-0054.txt?cvsroot=gentoo">2008/01/06 02:08:59</a></td>
34</tr> 33</tr>
35<tr class="field"><th class="field-name">Author:</th><td class="field-body">Piotr Jaroszyński &lt;peper&#32;&#97;t&#32;gentoo.org&gt;</td> 34<tr class="field"><th class="field-name">Author:</th><td class="field-body">Piotr Jaroszyński &lt;peper&#32;&#97;t&#32;gentoo.org&gt;</td>
36</tr> 35</tr>
37<tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td> 36<tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td>
38</tr> 37</tr>
39<tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td> 38<tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td>
40</tr> 39</tr>
41<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> 40<tr class="field"><th class="field-name">Content-Type:</th><td class="field-body"><a class="reference external" href="glep-0002.html">text/x-rst</a></td>
42</tr> 41</tr>
43<tr class="field"><th class="field-name">Created:</th><td class="field-body">09-Dec-2007</td> 42<tr class="field"><th class="field-name">Created:</th><td class="field-body">09-Dec-2007</td>
44</tr> 43</tr>
45<tr class="field"><th class="field-name">Post-History:</th><td class="field-body">09-Dec-2007</td> 44<tr class="field"><th class="field-name">Post-History:</th><td class="field-body">09-Dec-2007</td>
46</tr> 45</tr>
47</tbody> 46</tbody>
48</table> 47</table>
49<hr /> 48<hr />
50<div class="contents topic"> 49<div class="contents topic" id="contents">
51<p class="topic-title first"><a id="contents" name="contents">Contents</a></p> 50<p class="topic-title first">Contents</p>
52<ul class="simple"> 51<ul class="simple">
53<li><a class="reference" href="#abstract" id="id2" name="id2">Abstract</a></li> 52<li><a class="reference internal" href="#abstract" id="id2">Abstract</a></li>
54<li><a class="reference" href="#motivation" id="id3" name="id3">Motivation</a></li> 53<li><a class="reference internal" href="#motivation" id="id3">Motivation</a></li>
55<li><a class="reference" href="#specification" id="id4" name="id4">Specification</a></li> 54<li><a class="reference internal" href="#specification" id="id4">Specification</a></li>
56<li><a class="reference" href="#version-comparison" id="id5" name="id5">Version Comparison</a></li> 55<li><a class="reference internal" href="#version-comparison" id="id5">Version Comparison</a></li>
57<li><a class="reference" href="#backwards-compatibility" id="id6" name="id6">Backwards Compatibility</a></li> 56<li><a class="reference internal" href="#backwards-compatibility" id="id6">Backwards Compatibility</a></li>
58<li><a class="reference" href="#copyright" id="id7" name="id7">Copyright</a></li> 57<li><a class="reference internal" href="#copyright" id="id7">Copyright</a></li>
59</ul> 58</ul>
60</div> 59</div>
61<div class="section"> 60<div class="section" id="abstract">
62<h1><a class="toc-backref" href="#id2" id="abstract" name="abstract">Abstract</a></h1> 61<h1><a class="toc-backref" href="#id2">Abstract</a></h1>
63<p>This GLEP proposes addition of a new special package version suffix - <tt class="docutils literal"><span class="pre">scm</span></tt> - 62<p>This GLEP proposes addition of a new special package version suffix - <tt class="docutils literal">scm</tt> -
64for ebuilds checking out source directly from a source code management system.</p> 63for ebuilds checking out source directly from a source code management system.</p>
65</div> 64</div>
66<div class="section"> 65<div class="section" id="motivation">
67<h1><a class="toc-backref" href="#id3" id="motivation" name="motivation">Motivation</a></h1> 66<h1><a class="toc-backref" href="#id3">Motivation</a></h1>
68<p>Currently there is no standard way of identifying SCM ebuilds. Using 9999 as the 67<p>Currently there is no standard way of identifying SCM ebuilds. Using 9999 as the
69version is pretty common, but it is handled like any other ebuild and hence 68version is pretty common, but it is handled like any other ebuild and hence
70portage cannot provide any additional features for packages with such a version. 69portage cannot provide any additional features for packages with such a version.
71Another way is adding a separate package with a -cvs suffix in its name, but 70Another way is adding a separate package with a -cvs suffix in its name, but
72that forces the author to use <tt class="docutils literal"><span class="pre">||</span> <span class="pre">(</span> <span class="pre">cat/pkg</span> <span class="pre">cat/pkg-cvs</span> <span class="pre">)</span></tt> dependencies. The 71that forces the author to use <tt class="docutils literal">|| ( cat/pkg <span class="pre">cat/pkg-cvs</span> )</tt> dependencies. The
73closest to what is proposed in this GLEP is the <tt class="docutils literal"><span class="pre">cvs</span></tt> version part, but its 72closest to what is proposed in this GLEP is the <tt class="docutils literal">cvs</tt> version part, but its
74implementation is of very limited use. It has strange comparison rules, no 73implementation is of very limited use. It has strange comparison rules, no
75documentation, has been used sparingly (if ever) and has a misleading name.</p> 74documentation, has been used sparingly (if ever) and has a misleading name.</p>
76<p>The possibility for package managers to recognise SCM ebuilds would allow them 75<p>The possibility for package managers to recognise SCM ebuilds would allow them
77to add features dedicated specially to said ebuilds. One such feature could be 76to add features dedicated specially to said ebuilds. One such feature could be
78automatic re-installation of SCM packages once a day or week. Any 77automatic re-installation of SCM packages once a day or week. Any
79specifications for such features are beyond the scope of this GLEP.</p> 78specifications for such features are beyond the scope of this GLEP.</p>
80</div> 79</div>
81<div class="section"> 80<div class="section" id="specification">
82<h1><a class="toc-backref" href="#id4" id="specification" name="specification">Specification</a></h1> 81<h1><a class="toc-backref" href="#id4">Specification</a></h1>
83<p><tt class="docutils literal"><span class="pre">scm</span></tt> is a special suffix. It can be used on its own, but also in any other 82<p><tt class="docutils literal">scm</tt> is a special suffix. It can be used on its own, but also in any other
84valid version spec, just before the place where revision would go. And just like 83valid version spec, just before the place where revision would go. And just like
85revision it can be used only once in a version spec, e.g.:</p> 84revision it can be used only once in a version spec, e.g.:</p>
86<blockquote> 85<blockquote>
87<ul class="simple"> 86<ul class="simple">
88<li><tt class="docutils literal"><span class="pre">cat/pkg-1.0_alpha0-scm</span></tt></li> 87<li><tt class="docutils literal"><span class="pre">cat/pkg-1.0_alpha0-scm</span></tt></li>
91<li><tt class="docutils literal"><span class="pre">cat/pkg-1-scm</span></tt></li> 90<li><tt class="docutils literal"><span class="pre">cat/pkg-1-scm</span></tt></li>
92<li><tt class="docutils literal"><span class="pre">cat/pkg-1-scm-r2</span></tt></li> 91<li><tt class="docutils literal"><span class="pre">cat/pkg-1-scm-r2</span></tt></li>
93<li><tt class="docutils literal"><span class="pre">cat/pkg-scm</span></tt></li> 92<li><tt class="docutils literal"><span class="pre">cat/pkg-scm</span></tt></li>
94</ul> 93</ul>
95</blockquote> 94</blockquote>
96<p>These package atoms are sorted in ascending order (see <a class="reference" href="#version-comparison">Version Comparison</a>).</p> 95<p>These package atoms are sorted in ascending order (see <a class="reference internal" href="#version-comparison">Version Comparison</a>).</p>
97</div> 96</div>
98<div class="section"> 97<div class="section" id="version-comparison">
99<h1><a class="toc-backref" href="#id5" id="version-comparison" name="version-comparison">Version Comparison</a></h1> 98<h1><a class="toc-backref" href="#id5">Version Comparison</a></h1>
100<p>The addition of the scm suffix yields changes in version comparison:</p> 99<p>The addition of the scm suffix yields changes in version comparison:</p>
101<blockquote> 100<blockquote>
102<ul class="simple"> 101<ul class="simple">
103<li>When comparing version components from left to right the scm component has the 102<li>When comparing version components from left to right the scm component has the
104highest priority over other version components. Hence 103highest priority over other version components. Hence
105<tt class="docutils literal"><span class="pre">pkg-1_alpha-r3</span> <span class="pre">&lt;</span> <span class="pre">pkg-1-scm</span></tt>, 'scm' is greater than 'alpha-r3'.</li> 104<tt class="docutils literal"><span class="pre">pkg-1_alpha-r3</span> &lt; <span class="pre">pkg-1-scm</span></tt>, 'scm' is greater than 'alpha-r3'.</li>
106<li>Current suffixes with no number part no longer default to zero if they are 105<li>Current suffixes with no number part no longer default to zero if they are
107followed by an scm suffix. If that's the case the number part is considered 106followed by an scm suffix. If that's the case the number part is considered
108to be of a maximum value. Hence <tt class="docutils literal"><span class="pre">1_alpha2-scm</span> <span class="pre">&lt;</span> <span class="pre">1_alpha-scm</span></tt>, but still 107to be of a maximum value. Hence <tt class="docutils literal"><span class="pre">1_alpha2-scm</span> &lt; <span class="pre">1_alpha-scm</span></tt>, but still
109<tt class="docutils literal"><span class="pre">1_alpha</span> <span class="pre">==</span> <span class="pre">1_alpha0</span></tt>. The rationale behind this choice is to allow 108<tt class="docutils literal">1_alpha == 1_alpha0</tt>. The rationale behind this choice is to allow
110multiple branches. For instance imagine a package with an alpha branch 109multiple branches. For instance imagine a package with an alpha branch
111and multiple scm releases, as the following: <tt class="docutils literal"><span class="pre">alpha-scm</span></tt>, 110and multiple scm releases, as the following: <tt class="docutils literal"><span class="pre">alpha-scm</span></tt>,
112<tt class="docutils literal"><span class="pre">alpha2-scm</span></tt>, <tt class="docutils literal"><span class="pre">alpha3-scm</span></tt> and so forth. The desired outcome is 111<tt class="docutils literal"><span class="pre">alpha2-scm</span></tt>, <tt class="docutils literal"><span class="pre">alpha3-scm</span></tt> and so forth. The desired outcome is
113for <tt class="docutils literal"><span class="pre">alpha-scm</span></tt> to be greater than all other branches of the same tree.</li> 112for <tt class="docutils literal"><span class="pre">alpha-scm</span></tt> to be greater than all other branches of the same tree.</li>
114</ul> 113</ul>
115</blockquote> 114</blockquote>
116<p>Example parsing:</p> 115<p>Example parsing:</p>
117<blockquote> 116<blockquote>
118<ul> 117<ul>
119<li><dl class="first docutils"> 118<li><dl class="first docutils">
120<dt><tt class="docutils literal"><span class="pre">cat/pkg-scm</span> <span class="pre">&gt;</span> <span class="pre">cat/pkg-1</span></tt></dt> 119<dt><tt class="docutils literal"><span class="pre">cat/pkg-scm</span> &gt; <span class="pre">cat/pkg-1</span></tt></dt>
121<dd><p class="first last">When parsing from left to right the first difference is <tt class="docutils literal"><span class="pre">scm</span></tt> and 120<dd><p class="first last">When parsing from left to right the first difference is <tt class="docutils literal">scm</tt> and
122<tt class="docutils literal"><span class="pre">1</span></tt>. <tt class="docutils literal"><span class="pre">cat/pkg-scm</span></tt> wins.</p> 121<tt class="docutils literal">1</tt>. <tt class="docutils literal"><span class="pre">cat/pkg-scm</span></tt> wins.</p>
123</dd> 122</dd>
124</dl> 123</dl>
125</li> 124</li>
126<li><dl class="first docutils"> 125<li><dl class="first docutils">
127<dt><tt class="docutils literal"><span class="pre">cat/pkg-1-scm</span> <span class="pre">&gt;</span> <span class="pre">cat/pkg-1.0-scm</span></tt></dt> 126<dt><tt class="docutils literal"><span class="pre">cat/pkg-1-scm</span> &gt; <span class="pre">cat/pkg-1.0-scm</span></tt></dt>
128<dd><p class="first last">When parsing from left to right the first difference is <tt class="docutils literal"><span class="pre">scm</span></tt> and 127<dd><p class="first last">When parsing from left to right the first difference is <tt class="docutils literal">scm</tt> and
129<tt class="docutils literal"><span class="pre">0</span></tt>. <tt class="docutils literal"><span class="pre">cat/pkg-1-scm</span></tt> wins.</p> 128<tt class="docutils literal">0</tt>. <tt class="docutils literal"><span class="pre">cat/pkg-1-scm</span></tt> wins.</p>
130</dd> 129</dd>
131</dl> 130</dl>
132</li> 131</li>
133<li><dl class="first docutils"> 132<li><dl class="first docutils">
134<dt><tt class="docutils literal"><span class="pre">cat/pkg-1_alpha-scm</span> <span class="pre">&gt;</span> <span class="pre">cat/pkg-1_alpha1-scm</span></tt></dt> 133<dt><tt class="docutils literal"><span class="pre">cat/pkg-1_alpha-scm</span> &gt; <span class="pre">cat/pkg-1_alpha1-scm</span></tt></dt>
135<dd><p class="first last">In the first package version <tt class="docutils literal"><span class="pre">alpha</span></tt> doesn't have a number part <em>and</em> 134<dd><p class="first last">In the first package version <tt class="docutils literal">alpha</tt> doesn't have a number part <em>and</em>
136is followed by an <tt class="docutils literal"><span class="pre">scm</span></tt> suffix, hence it is considered to have a maximum 135is followed by an <tt class="docutils literal">scm</tt> suffix, hence it is considered to have a maximum
137value as the number part. When parsing from left to right the first 136value as the number part. When parsing from left to right the first
138difference is the number part of the <tt class="docutils literal"><span class="pre">alpha</span></tt> suffix. Maximum value 137difference is the number part of the <tt class="docutils literal">alpha</tt> suffix. Maximum value
139yielded by the following <tt class="docutils literal"><span class="pre">scm</span></tt> suffix wins with <tt class="docutils literal"><span class="pre">1</span></tt>.</p> 138yielded by the following <tt class="docutils literal">scm</tt> suffix wins with <tt class="docutils literal">1</tt>.</p>
140</dd> 139</dd>
141</dl> 140</dl>
142</li> 141</li>
143</ul> 142</ul>
144</blockquote> 143</blockquote>
145<p>List of version specs in ascending order:</p> 144<p>List of version specs in ascending order:</p>
146<blockquote> 145<blockquote>
147<ul class="simple"> 146<ul class="simple">
148<li><tt class="docutils literal"><span class="pre">1</span></tt></li> 147<li><tt class="docutils literal">1</tt></li>
149<li><tt class="docutils literal"><span class="pre">1.1-scm</span></tt></li> 148<li><tt class="docutils literal"><span class="pre">1.1-scm</span></tt></li>
150<li><tt class="docutils literal"><span class="pre">1.2_alpha-scm</span></tt></li> 149<li><tt class="docutils literal"><span class="pre">1.2_alpha-scm</span></tt></li>
151<li><tt class="docutils literal"><span class="pre">1.2_beta_p</span></tt></li> 150<li><tt class="docutils literal">1.2_beta_p</tt></li>
152<li><tt class="docutils literal"><span class="pre">1.2_beta_p0-scm</span></tt></li> 151<li><tt class="docutils literal"><span class="pre">1.2_beta_p0-scm</span></tt></li>
153<li><tt class="docutils literal"><span class="pre">1.2_beta_p1-scm</span></tt></li> 152<li><tt class="docutils literal"><span class="pre">1.2_beta_p1-scm</span></tt></li>
154<li><tt class="docutils literal"><span class="pre">1.2_beta_p-scm</span></tt></li> 153<li><tt class="docutils literal"><span class="pre">1.2_beta_p-scm</span></tt></li>
155<li><tt class="docutils literal"><span class="pre">1.2_beta1_p-scm</span></tt></li> 154<li><tt class="docutils literal"><span class="pre">1.2_beta1_p-scm</span></tt></li>
156<li><tt class="docutils literal"><span class="pre">1.2_beta10</span></tt></li> 155<li><tt class="docutils literal">1.2_beta10</tt></li>
157<li><tt class="docutils literal"><span class="pre">1.2_beta10_p1-scm</span></tt></li> 156<li><tt class="docutils literal"><span class="pre">1.2_beta10_p1-scm</span></tt></li>
158<li><tt class="docutils literal"><span class="pre">1.2_beta10-scm</span></tt></li> 157<li><tt class="docutils literal"><span class="pre">1.2_beta10-scm</span></tt></li>
159<li><tt class="docutils literal"><span class="pre">1.2_beta-scm</span></tt></li> 158<li><tt class="docutils literal"><span class="pre">1.2_beta-scm</span></tt></li>
160<li><tt class="docutils literal"><span class="pre">1.2</span></tt></li> 159<li><tt class="docutils literal">1.2</tt></li>
161<li><tt class="docutils literal"><span class="pre">1.2-scm</span></tt></li> 160<li><tt class="docutils literal"><span class="pre">1.2-scm</span></tt></li>
162<li><tt class="docutils literal"><span class="pre">1.2-scm-r1</span></tt></li> 161<li><tt class="docutils literal"><span class="pre">1.2-scm-r1</span></tt></li>
163<li><tt class="docutils literal"><span class="pre">1-scm</span></tt></li> 162<li><tt class="docutils literal"><span class="pre">1-scm</span></tt></li>
164<li><tt class="docutils literal"><span class="pre">10</span></tt></li> 163<li><tt class="docutils literal">10</tt></li>
165<li><tt class="docutils literal"><span class="pre">scm</span></tt></li> 164<li><tt class="docutils literal">scm</tt></li>
166<li><tt class="docutils literal"><span class="pre">scm-r3</span></tt></li> 165<li><tt class="docutils literal"><span class="pre">scm-r3</span></tt></li>
167</ul> 166</ul>
168</blockquote> 167</blockquote>
169</div> 168</div>
170<div class="section"> 169<div class="section" id="backwards-compatibility">
171<h1><a class="toc-backref" href="#id6" id="backwards-compatibility" name="backwards-compatibility">Backwards Compatibility</a></h1> 170<h1><a class="toc-backref" href="#id6">Backwards Compatibility</a></h1>
172<p>Portage versions prior to 2.1.2.12 (included in 2007.0) don't handle arbitrary 171<p>Portage versions prior to 2.1.2.12 (included in 2007.0) don't handle arbitrary
173version suffixes and die during various tasks making portage hard or impossible 172version suffixes and die during various tasks making portage hard or impossible
174to use. Later versions just ignore them displaying warnings. Hence use of 173to use. Later versions just ignore them displaying warnings. Hence use of
175<tt class="docutils literal"><span class="pre">scm</span></tt> suffixes in gentoo-x86 tree will probably have to wait till 2008.0 174<tt class="docutils literal">scm</tt> suffixes in gentoo-x86 tree will probably have to wait till 2008.0
176release or later.</p> 175release or later.</p>
177</div> 176</div>
178<div class="section"> 177<div class="section" id="copyright">
179<h1><a class="toc-backref" href="#id7" id="copyright" name="copyright">Copyright</a></h1> 178<h1><a class="toc-backref" href="#id7">Copyright</a></h1>
180<p>This document has been placed in the public domain.</p> 179<p>This document has been placed in the public domain.</p>
181<!-- vim: set tw=80 fileencoding=utf-8 spell spelllang=en et : --> 180<!-- vim: set tw=80 fileencoding=utf-8 spell spelllang=en et : -->
182</div> 181</div>
183 182
184</div> 183</div>
185<div class="footer"> 184<div class="footer">
186<hr class="footer" /> 185<hr class="footer" />
187<a class="reference" href="glep-0054.txt">View document source</a>. 186<a class="reference external" href="glep-0054.txt">View document source</a>.
188Generated on: 2008-01-06 02:08 UTC. 187Generated on: 2010-04-07 22:10 UTC.
189Generated 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. 188Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
190 189
191</div> 190</div>
192</body> 191</body>
193</html> 192</html>
194

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

  ViewVC Help
Powered by ViewVC 1.1.20