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 |
|
|
<!-- |
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 |
peper |
1.5 |
<title>GLEP 54 -- scm package version suffix</title> |
13 |
antarus |
1.1 |
<link rel="stylesheet" href="tools/glep.css" type="text/css" /> |
14 |
|
|
</head> |
15 |
|
|
<body bgcolor="white"> |
16 |
|
|
<table class="navigation" cellpadding="0" cellspacing="0" |
17 |
|
|
width="100%" border="0"> |
18 |
|
|
<tr><td class="navicon" width="150" height="35"> |
19 |
|
|
<a href="http://www.gentoo.org/" title="Gentoo Linux Home Page"> |
20 |
|
|
<img src="http://www.gentoo.org/images/gentoo-new.gif" alt="[Gentoo]" |
21 |
|
|
border="0" width="150" height="35" /></a></td> |
22 |
|
|
<td class="textlinks" align="left"> |
23 |
|
|
[<b><a href="http://www.gentoo.org/">Gentoo Linux Home</a></b>] |
24 |
|
|
[<b><a href="http://www.gentoo.org/peps">GLEP Index</a></b>] |
25 |
|
|
[<b><a href="http://www.gentoo.org/proj/en/glep/glep-0054.txt">GLEP Source</a></b>] |
26 |
|
|
</td></tr></table> |
27 |
|
|
<table class="rfc2822 docutils field-list" frame="void" rules="none"> |
28 |
|
|
<col class="field-name" /> |
29 |
|
|
<col class="field-body" /> |
30 |
|
|
<tbody valign="top"> |
31 |
|
|
<tr class="field"><th class="field-name">GLEP:</th><td class="field-body">54</td> |
32 |
|
|
</tr> |
33 |
peper |
1.5 |
<tr class="field"><th class="field-name">Title:</th><td class="field-body">scm package version suffix</td> |
34 |
antarus |
1.1 |
</tr> |
35 |
peper |
1.5 |
<tr class="field"><th class="field-name">Version:</th><td class="field-body">$Revision: $</td> |
36 |
antarus |
1.1 |
</tr> |
37 |
peper |
1.5 |
<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">$Date: $</a></td> |
38 |
antarus |
1.1 |
</tr> |
39 |
peper |
1.5 |
<tr class="field"><th class="field-name">Author:</th><td class="field-body">Piotr JaroszyĆski <peper at gentoo.org></td> |
40 |
antarus |
1.1 |
</tr> |
41 |
peper |
1.5 |
<tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td> |
42 |
antarus |
1.1 |
</tr> |
43 |
peper |
1.5 |
<tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td> |
44 |
antarus |
1.1 |
</tr> |
45 |
|
|
<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> |
46 |
|
|
</tr> |
47 |
peper |
1.5 |
<tr class="field"><th class="field-name">Created:</th><td class="field-body">09-Dec-2007</td> |
48 |
antarus |
1.1 |
</tr> |
49 |
peper |
1.5 |
<tr class="field"><th class="field-name">Post-History:</th><td class="field-body">09-Dec-2007</td> |
50 |
antarus |
1.1 |
</tr> |
51 |
|
|
</tbody> |
52 |
|
|
</table> |
53 |
|
|
<hr /> |
54 |
|
|
<div class="contents topic"> |
55 |
|
|
<p class="topic-title first"><a id="contents" name="contents">Contents</a></p> |
56 |
|
|
<ul class="simple"> |
57 |
|
|
<li><a class="reference" href="#abstract" id="id2" name="id2">Abstract</a></li> |
58 |
|
|
<li><a class="reference" href="#motivation" id="id3" name="id3">Motivation</a></li> |
59 |
peper |
1.5 |
<li><a class="reference" href="#specification" id="id4" name="id4">Specification</a></li> |
60 |
|
|
<li><a class="reference" href="#version-comparison" id="id5" name="id5">Version Comparison</a></li> |
61 |
|
|
<li><a class="reference" href="#backwards-compatibility" id="id6" name="id6">Backwards Compatibility</a></li> |
62 |
antarus |
1.1 |
<li><a class="reference" href="#copyright" id="id7" name="id7">Copyright</a></li> |
63 |
|
|
</ul> |
64 |
|
|
</div> |
65 |
|
|
<div class="section"> |
66 |
|
|
<h1><a class="toc-backref" href="#id2" id="abstract" name="abstract">Abstract</a></h1> |
67 |
peper |
1.5 |
<p>This GLEP proposes addition of a new special package version suffix - <tt class="docutils literal"><span class="pre">scm</span></tt> - |
68 |
|
|
for ebuilds checking out source directly from a source code management system.</p> |
69 |
antarus |
1.1 |
</div> |
70 |
|
|
<div class="section"> |
71 |
|
|
<h1><a class="toc-backref" href="#id3" id="motivation" name="motivation">Motivation</a></h1> |
72 |
peper |
1.5 |
<p>Currently there is no standard way of marking SCM ebuilds. Using 9999 as the |
73 |
|
|
version is pretty common, but it is handled like any other ebuild and hence |
74 |
|
|
portage cannot provide any additional features for packages with such a version. |
75 |
|
|
Another way is adding separate package with -cvs suffix in its name, but that |
76 |
|
|
forces 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 closest to what |
77 |
|
|
is proposed in this GLEP is the <tt class="docutils literal"><span class="pre">cvs</span></tt> version part, but its implementation is |
78 |
|
|
of very limited use. It has strange comparison rules, no documentation, has |
79 |
|
|
never been used in the tree and has a misleading name.</p> |
80 |
|
|
<p>The possibility for package managers to recognise SCM ebuilds would allow them |
81 |
|
|
to add features dedicated specially to said ebuilds. One such feature could be |
82 |
|
|
automatic re-installation of SCM packages once a day or week, but that's beyond |
83 |
|
|
this GLEP.</p> |
84 |
|
|
</div> |
85 |
|
|
<div class="section"> |
86 |
|
|
<h1><a class="toc-backref" href="#id4" id="specification" name="specification">Specification</a></h1> |
87 |
|
|
<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 |
88 |
|
|
valid version spec, just before the place where revision would go. And just like |
89 |
|
|
revision it can be used only once in a version spec, e.g.:</p> |
90 |
|
|
<blockquote> |
91 |
|
|
<ul class="simple"> |
92 |
|
|
<li><tt class="docutils literal"><span class="pre">cat/pkg-1.0_alpha0-scm</span></tt></li> |
93 |
|
|
<li><tt class="docutils literal"><span class="pre">cat/pkg-1.0_alpha-scm</span></tt></li> |
94 |
|
|
<li><tt class="docutils literal"><span class="pre">cat/pkg-1.0-scm-r3</span></tt></li> |
95 |
|
|
<li><tt class="docutils literal"><span class="pre">cat/pkg-1-scm</span></tt></li> |
96 |
|
|
<li><tt class="docutils literal"><span class="pre">cat/pkg-1-scm-r2</span></tt></li> |
97 |
|
|
<li><tt class="docutils literal"><span class="pre">cat/pkg-scm</span></tt></li> |
98 |
|
|
</ul> |
99 |
|
|
</blockquote> |
100 |
|
|
<p>These package atoms are sorted in ascending order (see <a class="reference" href="#version-comparison">Version Comparison</a>).</p> |
101 |
|
|
</div> |
102 |
|
|
<div class="section"> |
103 |
|
|
<h1><a class="toc-backref" href="#id5" id="version-comparison" name="version-comparison">Version Comparison</a></h1> |
104 |
|
|
<p>The addition of the scm suffix yields changes in version comparison:</p> |
105 |
|
|
<blockquote> |
106 |
|
|
<ul class="simple"> |
107 |
|
|
<li>When comparing version components from left to right the scm component has the |
108 |
|
|
highest priority.</li> |
109 |
|
|
<li>Current suffixes with no number part no longer default to zero if they are |
110 |
|
|
followed by an scm suffix. If that's the case the number part is considered |
111 |
|
|
to be of a maximum value. Hence <tt class="docutils literal"><span class="pre">1_alpha2-scm</span> <span class="pre"><</span> <span class="pre">1_alpha-scm</span></tt>, but still |
112 |
|
|
<tt class="docutils literal"><span class="pre">1_alpha</span> <span class="pre">==</span> <span class="pre">1_alpha0</span></tt>.</li> |
113 |
|
|
</ul> |
114 |
|
|
</blockquote> |
115 |
|
|
<p>Example parsing:</p> |
116 |
|
|
<blockquote> |
117 |
|
|
<ul> |
118 |
|
|
<li><dl class="first docutils"> |
119 |
|
|
<dt><tt class="docutils literal"><span class="pre">cat/pkg-scm</span> <span class="pre">></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"><span class="pre">scm</span></tt> and |
121 |
|
|
<tt class="docutils literal"><span class="pre">1</span></tt>. <tt class="docutils literal"><span class="pre">cat/pkg-scm</span></tt> wins.</p> |
122 |
|
|
</dd> |
123 |
|
|
</dl> |
124 |
|
|
</li> |
125 |
|
|
<li><dl class="first docutils"> |
126 |
|
|
<dt><tt class="docutils literal"><span class="pre">cat/pkg-1-scm</span> <span class="pre">></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"><span class="pre">scm</span></tt> and |
128 |
|
|
<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> |
129 |
|
|
</dd> |
130 |
|
|
</dl> |
131 |
|
|
</li> |
132 |
|
|
<li><dl class="first docutils"> |
133 |
|
|
<dt><tt class="docutils literal"><span class="pre">cat/pkg-1_alpha-scm</span> <span class="pre">></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"><span class="pre">alpha</span></tt> doesn't have a number part <em>and</em> |
135 |
|
|
is followed by an <tt class="docutils literal"><span class="pre">scm</span></tt> suffix, hence it is considered to have a maximum |
136 |
|
|
value as the number part. When parsing from left to right the first |
137 |
|
|
difference is the number part of the <tt class="docutils literal"><span class="pre">alpha</span></tt> suffix. Maximum value |
138 |
|
|
yielded 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> |
139 |
|
|
</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 |
|
|
<li><tt class="docutils literal"><span class="pre">1</span></tt></li> |
148 |
|
|
<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 |
|
|
<li><tt class="docutils literal"><span class="pre">1.2_beta_p</span></tt></li> |
151 |
|
|
<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 |
|
|
<li><tt class="docutils literal"><span class="pre">1.2_beta10</span></tt></li> |
156 |
|
|
<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 |
|
|
<li><tt class="docutils literal"><span class="pre">1.2</span></tt></li> |
160 |
|
|
<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 |
|
|
<li><tt class="docutils literal"><span class="pre">10</span></tt></li> |
164 |
|
|
<li><tt class="docutils literal"><span class="pre">scm</span></tt></li> |
165 |
|
|
<li><tt class="docutils literal"><span class="pre">scm-r3</span></tt></li> |
166 |
|
|
</ul> |
167 |
|
|
</blockquote> |
168 |
|
|
</div> |
169 |
|
|
<div class="section"> |
170 |
|
|
<h1><a class="toc-backref" href="#id6" id="backwards-compatibility" name="backwards-compatibility">Backwards Compatibility</a></h1> |
171 |
|
|
<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 |
|
|
<tt class="docutils literal"><span class="pre">scm</span></tt> suffixes in gentoo-x86 tree will probably have to wait till 2008.0 |
175 |
|
|
release or later.</p> |
176 |
antarus |
1.1 |
</div> |
177 |
|
|
<div class="section"> |
178 |
|
|
<h1><a class="toc-backref" href="#id7" id="copyright" name="copyright">Copyright</a></h1> |
179 |
|
|
<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 |
|
|
<a class="reference" href="glep-0054.txt">View document source</a>. |
187 |
peper |
1.5 |
Generated on: 2007-12-17 18:41 UTC. |
188 |
antarus |
1.1 |
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. |
189 |
|
|
|
190 |
|
|
</div> |
191 |
|
|
</body> |
192 |
|
|
</html> |
193 |
|
|
|