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

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

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

Revision 1.4 Revision 1.5
1GLEP: 54 1GLEP: 54
2Title: scm package version suffix 2Title: scm package version suffix
3Version: $Revision: 1.4 $ 3Version: $Revision: 1.5 $
4Last-Modified: $Date: 2007/12/17 18:42:33 $ 4Last-Modified: $Date: 2008/01/06 02:08:59 $
5Author: Piotr Jaroszyński <peper@gentoo.org> 5Author: Piotr Jaroszyński <peper@gentoo.org>
6Status: Draft 6Status: Draft
7Type: Standards Track 7Type: Standards Track
8Content-Type: text/x-rst 8Content-Type: text/x-rst
9Created: 09-Dec-2007 9Created: 09-Dec-2007
16for ebuilds checking out source directly from a source code management system. 16for ebuilds checking out source directly from a source code management system.
17 17
18Motivation 18Motivation
19========== 19==========
20 20
21Currently there is no standard way of marking SCM ebuilds. Using 9999 as the 21Currently there is no standard way of identifying SCM ebuilds. Using 9999 as the
22version is pretty common, but it is handled like any other ebuild and hence 22version is pretty common, but it is handled like any other ebuild and hence
23portage cannot provide any additional features for packages with such a version. 23portage cannot provide any additional features for packages with such a version.
24Another way is adding separate package with -cvs suffix in its name, but that 24Another way is adding a separate package with a -cvs suffix in its name, but
25forces to use ``|| ( cat/pkg cat/pkg-cvs )`` dependencies. The closest to what 25that forces the author to use ``|| ( cat/pkg cat/pkg-cvs )`` dependencies. The
26is proposed in this GLEP is the ``cvs`` version part, but its implementation is 26closest to what is proposed in this GLEP is the ``cvs`` version part, but its
27of very limited use. It has strange comparison rules, no documentation, has 27implementation is of very limited use. It has strange comparison rules, no
28never been used in the tree and has a misleading name. 28documentation, has been used sparingly (if ever) and has a misleading name.
29 29
30The possibility for package managers to recognise SCM ebuilds would allow them 30The possibility for package managers to recognise SCM ebuilds would allow them
31to add features dedicated specially to said ebuilds. One such feature could be 31to add features dedicated specially to said ebuilds. One such feature could be
32automatic re-installation of SCM packages once a day or week, but that's beyond 32automatic re-installation of SCM packages once a day or week. Any
33this GLEP. 33specifications for such features are beyond the scope of this GLEP.
34 34
35Specification 35Specification
36============= 36=============
37
37 38
38``scm`` is a special suffix. It can be used on its own, but also in any other 39``scm`` is a special suffix. It can be used on its own, but also in any other
39valid version spec, just before the place where revision would go. And just like 40valid version spec, just before the place where revision would go. And just like
40revision it can be used only once in a version spec, e.g.: 41revision it can be used only once in a version spec, e.g.:
41 42
52================== 53==================
53 54
54The addition of the scm suffix yields changes in version comparison: 55The addition of the scm suffix yields changes in version comparison:
55 56
56 * When comparing version components from left to right the scm component has the 57 * When comparing version components from left to right the scm component has the
57 highest priority. 58 highest priority over other version components. Hence
59 ``pkg-1_alpha-r3 < pkg-1-scm``, 'scm' is greater than 'alpha-r3'.
58 * Current suffixes with no number part no longer default to zero if they are 60 * Current suffixes with no number part no longer default to zero if they are
59 followed by an scm suffix. If that's the case the number part is considered 61 followed by an scm suffix. If that's the case the number part is considered
60 to be of a maximum value. Hence ``1_alpha2-scm < 1_alpha-scm``, but still 62 to be of a maximum value. Hence ``1_alpha2-scm < 1_alpha-scm``, but still
61 ``1_alpha == 1_alpha0``. 63 ``1_alpha == 1_alpha0``. The rationale behind this choice is to allow
64 multiple branches. For instance imagine a package with an alpha branch
65 and multiple scm releases, as the following: ``alpha-scm``,
66 ``alpha2-scm``, ``alpha3-scm`` and so forth. The desired outcome is
67 for ``alpha-scm`` to be greater than all other branches of the same tree.
62 68
63Example parsing: 69Example parsing:
64 70
65 * ``cat/pkg-scm > cat/pkg-1`` 71 * ``cat/pkg-scm > cat/pkg-1``
66 When parsing from left to right the first difference is ``scm`` and 72 When parsing from left to right the first difference is ``scm`` and

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.20