1VERCMP(8) Pacman Manual VERCMP(8)
2
3
4
6 vercmp - version comparison utility
7
9 vercmp <version1> <version2>
10
12 vercmp is used to determine the relationship between two given version
13 numbers. It outputs values as follows:
14
15 · < 0 : if ver1 < ver2
16
17 · = 0 : if ver1 == ver2
18
19 · > 0 : if ver1 > ver2
20
21 Version comparison operates as follows:
22
23 Alphanumeric:
24 1.0a < 1.0b < 1.0beta < 1.0p < 1.0pre < 1.0rc < 1.0 < 1.0.a < 1.0.1
25 Numeric:
26 1 < 1.0 < 1.1 < 1.1.1 < 1.2 < 2.0 < 3.0.0
27
28 Additionally, version strings can have an epoch value defined that will
29 overrule any version comparison, unless the epoch values are equal.
30 This is specified in an epoch:version-rel format. For example, 2:1.0-1
31 is always greater than 1:3.6-1.
32
33 Keep in mind that the pkgrel is only compared if it is available on
34 both versions given to this tool. For example, comparing 1.5-1 and 1.5
35 will yield 0; comparing 1.5-1 and 1.5-2 will yield < 0 as expected.
36 This is mainly for supporting versioned dependencies that do not
37 include the pkgrel.
38
40 -h, --help
41 Display syntax for the given operation. If no operation was
42 supplied, then the general syntax is shown.
43
45 $ vercmp 1 2
46 -1
47
48 $ vercmp 2 1
49 1
50
51 $ vercmp 2.0-1 1.7-6
52 1
53
54 $ vercmp 2.0 2.0-13
55 0
56
57 $ vercmp 4.34 1:001
58 -1
59
61 There is none.
62
64 pacman(8), makepkg(8), libalpm(3)
65
66 See the pacman website at https://www.archlinux.org/pacman/ for current
67 information on pacman and its related tools.
68
70 Bugs? You must be kidding; there are no bugs in this software. But if
71 we happen to be wrong, send us an email with as much detail as possible
72 to pacman-dev@archlinux.org.
73
75 Current maintainers:
76
77 · Allan McRae <allan@archlinux.org>
78
79 · Andrew Gregory <andrew.gregory.8@gmail.com>
80
81 · Dan McGee <dan@archlinux.org>
82
83 · Dave Reisner <dreisner@archlinux.org>
84
85 Past major contributors:
86
87 · Judd Vinet <jvinet@zeroflux.org>
88
89 · Aurelien Foret <aurelien@archlinux.org>
90
91 · Aaron Griffin <aaron@archlinux.org>
92
93 · Xavier Chantry <shiningxc@gmail.com>
94
95 · Nagy Gabor <ngaba@bibl.u-szeged.hu>
96
97 For additional contributors, use git shortlog -s on the pacman.git
98 repository.
99
100
101
102Pacman 5.0.2 2019-02-02 VERCMP(8)