Gentoo Archives: gentoo-dev

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] JFYIOR: A Simple Package Versioning Spec
Date: Mon, 21 Sep 2015 20:05:08
Message-Id: 560062D4.40706@gmail.com
In Reply to: Re: [gentoo-dev] JFYIOR: A Simple Package Versioning Spec by Taahir Ahmed
1 On 21/09/2015 21:45, Taahir Ahmed wrote:
2 >
3 > Instead of adding more and more layers to the Gentoo versioning spec to
4 > work around insane upstreams, why not put the relative ordering of
5 > versions into the ebuilds?
6 >
7 > Then, a version identifier would just be a unique string.
8 >
9 > An ebuild would declare which version strings it succeeds.
10
11 That won't work too well for the case of earlier versions that receive
12 updates or -r revisions example mysql. 5.5 and 5.6 are both in the tree
13 so when 5.5.46 is released, 5.6.26 would need to have it's
14 VERSION_SUCCEEDS ebuild updated. This leads to an odd situation where a
15 change in one ebuild is reflected in another.
16
17 To go the route of declaring order in the ebuild, VERSION_PRECEEDS would
18 fit better.
19
20 Personally the approach that makes most sense to me is to have a spec as
21 simple as possible to cover the majority cases. Most projects are
22 somewhat sane with version numbers, so cover those with a simple spec.
23 Deal with all weird cases using VERSION_PRECEEDS
24
25
26
27 >
28 > Then even in the case of an upstream that did something stupid, like
29 > only releasing versions identified by the git commit ID, the package
30 > manager can both:
31 >
32 > * Use the upstream versioning scheme.
33 >
34 > * Know which version is "best", by finding a topological ordering on
35 > the succession graph.
36 >
37 > ---- mypackage-insaneversionspec1.ebuild -------------------------------
38 > ...
39 > # This was the first release of the package, so it succeeds nothing.
40 > VERSION_SUCCEEDS=""
41 > ...
42 > ---- EOF ---------------------------------------------------------------
43 >
44 > ---- mypackage-insaneversionspec2.ebuild -------------------------------
45 > ...
46 > # This was the second release of the package, so it succeeds the first
47 > # version.
48 > VERSION_SUCCEEDS="insaneversionspec2"
49 > ...
50 > ---- EOF ---------------------------------------------------------------
51 >
52 > Obviously, the downside of this scheme is that you have to load and
53 > parse every ebuild for a given atom, rather than being able to find the
54 > best one just by walking the filenames.
55 >
56 > Taahir Ahmed
57 >
58
59
60 --
61 Alan McKinnon
62 alan.mckinnon@×××××.com