1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
---
GLEP: 54
Title: scm package version suffix
Author: Piotr Jaroszyński <peper@gentoo.org>
Type: Standards Track
Status: Deferred
Version: 1
Created: 2007-12-09
Last-Modified: 2014-01-23
Post-History: 2007-12-09
Content-Type: text/x-rst
---
Status
======
Marked as deferred by GLEP editor creffett due to inactivity
Abstract
========
This GLEP proposes addition of a new special package version suffix - ``scm`` -
for ebuilds checking out source directly from a source code management system.
Motivation
==========
Currently there is no standard way of identifying SCM ebuilds. Using 9999 as the
version is pretty common, but it is handled like any other ebuild and hence
portage cannot provide any additional features for packages with such a version.
Another way is adding a separate package with a -cvs suffix in its name, but
that forces the author to use ``|| ( cat/pkg cat/pkg-cvs )`` dependencies. The
closest to what is proposed in this GLEP is the ``cvs`` version part, but its
implementation is of very limited use. It has strange comparison rules, no
documentation, has been used sparingly (if ever) and has a misleading name.
The possibility for package managers to recognise SCM ebuilds would allow them
to add features dedicated specially to said ebuilds. One such feature could be
automatic re-installation of SCM packages once a day or week. Any
specifications for such features are beyond the scope of this GLEP.
Specification
=============
``scm`` is a special suffix. It can be used on its own, but also in any other
valid version spec, just before the place where revision would go. And just like
revision it can be used only once in a version spec, e.g.:
* ``cat/pkg-1.0_alpha0-scm``
* ``cat/pkg-1.0_alpha-scm``
* ``cat/pkg-1.0-scm-r3``
* ``cat/pkg-1-scm``
* ``cat/pkg-1-scm-r2``
* ``cat/pkg-scm``
These package atoms are sorted in ascending order (see `Version Comparison`_).
Version Comparison
==================
The addition of the scm suffix yields changes in version comparison:
* When comparing version components from left to right the scm component has the
highest priority over other version components. Hence
``pkg-1_alpha-r3 < pkg-1-scm``, 'scm' is greater than 'alpha-r3'.
* Current suffixes with no number part no longer default to zero if they are
followed by an scm suffix. If that's the case the number part is considered
to be of a maximum value. Hence ``1_alpha2-scm < 1_alpha-scm``, but still
``1_alpha == 1_alpha0``. The rationale behind this choice is to allow
multiple branches. For instance imagine a package with an alpha branch
and multiple scm releases, as the following: ``alpha-scm``,
``alpha2-scm``, ``alpha3-scm`` and so forth. The desired outcome is
for ``alpha-scm`` to be greater than all other branches of the same tree.
Example parsing:
* ``cat/pkg-scm > cat/pkg-1``
When parsing from left to right the first difference is ``scm`` and
``1``. ``cat/pkg-scm`` wins.
* ``cat/pkg-1-scm > cat/pkg-1.0-scm``
When parsing from left to right the first difference is ``scm`` and
``0``. ``cat/pkg-1-scm`` wins.
* ``cat/pkg-1_alpha-scm > cat/pkg-1_alpha1-scm``
In the first package version ``alpha`` doesn't have a number part *and*
is followed by an ``scm`` suffix, hence it is considered to have a maximum
value as the number part. When parsing from left to right the first
difference is the number part of the ``alpha`` suffix. Maximum value
yielded by the following ``scm`` suffix wins with ``1``.
List of version specs in ascending order:
* ``1``
* ``1.1-scm``
* ``1.2_alpha-scm``
* ``1.2_beta_p``
* ``1.2_beta_p0-scm``
* ``1.2_beta_p1-scm``
* ``1.2_beta_p-scm``
* ``1.2_beta1_p-scm``
* ``1.2_beta10``
* ``1.2_beta10_p1-scm``
* ``1.2_beta10-scm``
* ``1.2_beta-scm``
* ``1.2``
* ``1.2-scm``
* ``1.2-scm-r1``
* ``1-scm``
* ``10``
* ``scm``
* ``scm-r3``
Backwards Compatibility
=======================
Portage versions prior to 2.1.2.12 (included in 2007.0) don't handle arbitrary
version suffixes and die during various tasks making portage hard or impossible
to use. Later versions just ignore them displaying warnings. Hence use of
``scm`` suffixes in gentoo-x86 tree will probably have to wait till 2008.0
release or later.
Copyright
=========
This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
Unported License. To view a copy of this license, visit
https://creativecommons.org/licenses/by-sa/3.0/.
.. vim: set tw=80 fileencoding=utf-8 spell spelllang=en et :
|