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