Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] eapi7-ver.eclass: 'Early adopter' version of EAPI 7 version manip
Date: Tue, 19 Sep 2017 13:12:03
Message-Id: 1505826712.22101.6.camel@gentoo.org
In Reply to: [gentoo-dev] [PATCH] eapi7-ver.eclass: 'Early adopter' version of EAPI 7 version manip by "Michał Górny"
1 W dniu pią, 08.09.2017 o godzinie 13∶19 +0200, użytkownik Michał Górny
2 napisał:
3 > EAPI 7 is introducing new version manipulation and comparison functions
4 > that aim to replace versionator.eclass. This eclass provides an 'early
5 > adopter' versions of those routines.
6 >
7 > It serves two goals:
8 >
9 > a. getting wider review and some real-life testing before
10 > the specification is set in stone, and
11 >
12 > b. making it possible to adapt ebuilds to the new routines early,
13 > reducing the future work of EAPI 7 porting.
14 >
15 > For more details on the new logic, please see the eclass documentation.
16 > Long story short, we are introducing three functions:
17 >
18 > 1. ver_cut -- to get substrings of the version string,
19 >
20 > 2. ver_rs -- to replace version separators via indices,
21 >
22 > 3. ver_test -- to compare two version numbers.
23 >
24 > The third function is not implemented in the eclass. It's meant to reuse
25 > the algorithms from the package manager, and the final implementation
26 > will most likely reuse the code from the package manager (e.g. via IPC).
27 >
28
29 Merged now, with some documentation fixes and additional benchmark to
30 compare it with versionator.eclass. Here are the approximate results:
31
32 cutting
33 real 5.64 5.62 5.55 5.57 5.56 => 5.59 avg
34 user 6.25 6.23 6.24 6.10 6.09 => 6.18 avg
35 cutting_versionator
36 real 105.00 104.10 104.40 104.30 104.10 => 104.38 avg
37 user 71.30 71.40 71.20 70.70 71.80 => 71.28 avg
38 replacing
39 real 4.76 4.75 4.79 4.77 4.75 => 4.76 avg
40 user 5.16 5.48 5.60 5.62 5.11 => 5.39 avg
41 replacing_versionator
42 real 68.50 68.60 68.40 68.20 68.40 => 68.42 avg
43 user 51.60 51.40 51.10 51.60 52.30 => 51.60 avg
44
45 Please note that versionator tests were run with 10 times less
46 repetitions and the results were multiplied by 10 to avoid it taking
47 forever.
48
49 --
50 Best regards,
51 Michał Górny

Replies