Debian Codegraph @

upstream/debian-unstable/man8/vercmp.8

raw
1 '\" t
2 .\" Title: vercmp
3 .\" Author: [see the "Authors" section]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\" Date: 11-11-1111
6 .\" Manual: Pacman Manual
7 .\" Source: Pacman 7.1.0
8 .\" Language: English
9 .\"
10 .TH "VERCMP" "8" "11\-11\-1111" "Pacman 7\&.1\&.0" "Pacman Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 vercmp \- version comparison utility
32 .SH "SYNOPSIS"
33 .sp
34 \fIvercmp\fR [\-h] [\-\-help] <version1> <version2>
35 .SH "DESCRIPTION"
36 .sp
37 \fIvercmp\fR is used to determine the relationship between two given version numbers\&. It outputs values as follows:
38 .sp
39 .RS 4
40 .ie n \{\
41 \h'-04'\(bu\h'+03'\c
42 .\}
43 .el \{\
44 .sp -1
45 .IP \(bu 2.3
46 .\}
47 < 0 : if ver1 < ver2
48 .RE
49 .sp
50 .RS 4
51 .ie n \{\
52 \h'-04'\(bu\h'+03'\c
53 .\}
54 .el \{\
55 .sp -1
56 .IP \(bu 2.3
57 .\}
58 = 0 : if ver1 == ver2
59 .RE
60 .sp
61 .RS 4
62 .ie n \{\
63 \h'-04'\(bu\h'+03'\c
64 .\}
65 .el \{\
66 .sp -1
67 .IP \(bu 2.3
68 .\}
69 > 0 : if ver1 > ver2
70 .RE
71 .sp
72 Version comparison operates as follows:
73 .sp
74 .if n \{\
75 .RS 4
76 .\}
77 .nf
78 Alphanumeric:
79 1\&.0a < 1\&.0b < 1\&.0beta < 1\&.0p < 1\&.0pre < 1\&.0rc < 1\&.0 < 1\&.0\&.a < 1\&.0\&.1
80 Numeric:
81 1 < 1\&.0 < 1\&.1 < 1\&.1\&.1 < 1\&.2 < 2\&.0 < 3\&.0\&.0
82 .fi
83 .if n \{\
84 .RE
85 .\}
86 .sp
87 Additionally, version strings can have an \fIepoch\fR value defined that will overrule any version comparison, unless the epoch values are equal\&. This is specified in an epoch:version\-rel format\&. For example, 2:1\&.0\-1 is always greater than 1:3\&.6\-1\&.
88 .sp
89 Keep in mind that the \fIpkgrel\fR is only compared if it is available on both versions given to this tool\&. For example, comparing 1\&.5\-1 and 1\&.5 will yield 0; comparing 1\&.5\-1 and 1\&.5\-2 will yield < 0 as expected\&. This is mainly for supporting versioned dependencies that do not include the \fIpkgrel\fR\&.
90 .SH "OPTIONS"
91 .PP
92 \fB\-h, \-\-help\fR
93 .RS 4
94 Display summary of the available return codes\&. Must be the first option specified\&.
95 .RE
96 .SH "EXAMPLES"
97 .sp
98 .if n \{\
99 .RS 4
100 .\}
101 .nf
102 $ vercmp 1 2
103 \-1
104 .fi
105 .if n \{\
106 .RE
107 .\}
108 .sp
109 .if n \{\
110 .RS 4
111 .\}
112 .nf
113 $ vercmp 2 1
114 1
115 .fi
116 .if n \{\
117 .RE
118 .\}
119 .sp
120 .if n \{\
121 .RS 4
122 .\}
123 .nf
124 $ vercmp 2\&.0\-1 1\&.7\-6
125 1
126 .fi
127 .if n \{\
128 .RE
129 .\}
130 .sp
131 .if n \{\
132 .RS 4
133 .\}
134 .nf
135 $ vercmp 2\&.0 2\&.0\-13
136 0
137 .fi
138 .if n \{\
139 .RE
140 .\}
141 .sp
142 .if n \{\
143 .RS 4
144 .\}
145 .nf
146 $ vercmp 4\&.34 1:001
147 \-1
148 .fi
149 .if n \{\
150 .RE
151 .\}
152 .SH "SEE ALSO"
153 .sp
154 \fBpacman\fR(8), \fBmakepkg\fR(8), \fBlibalpm\fR(3)
155 .sp
156 See the pacman website at https://archlinux\&.org/pacman/ for current information on pacman and its related tools\&.
157 .SH "BUGS"
158 .sp
159 Bugs? You must be kidding; there are no bugs in this software\&. But if we happen to be wrong, please report them to the issue tracker at https://gitlab\&.archlinux\&.org/pacman/pacman/\-/issues with specific information such as your command\-line, the nature of the bug, and even the package database if it helps\&.
160 .SH "AUTHORS"
161 .sp
162 Current maintainers:
163 .sp
164 .RS 4
165 .ie n \{\
166 \h'-04'\(bu\h'+03'\c
167 .\}
168 .el \{\
169 .sp -1
170 .IP \(bu 2.3
171 .\}
172 Allan McRae <allan@archlinux\&.org>
173 .RE
174 .sp
175 .RS 4
176 .ie n \{\
177 \h'-04'\(bu\h'+03'\c
178 .\}
179 .el \{\
180 .sp -1
181 .IP \(bu 2.3
182 .\}
183 Andrew Gregory <andrew\&.gregory\&.8@gmail\&.com>
184 .RE
185 .sp
186 .RS 4
187 .ie n \{\
188 \h'-04'\(bu\h'+03'\c
189 .\}
190 .el \{\
191 .sp -1
192 .IP \(bu 2.3
193 .\}
194 Morgan Adamiec <morganamilo@archlinux\&.org>
195 .RE
196 .sp
197 Past major contributors:
198 .sp
199 .RS 4
200 .ie n \{\
201 \h'-04'\(bu\h'+03'\c
202 .\}
203 .el \{\
204 .sp -1
205 .IP \(bu 2.3
206 .\}
207 Judd Vinet <jvinet@zeroflux\&.org>
208 .RE
209 .sp
210 .RS 4
211 .ie n \{\
212 \h'-04'\(bu\h'+03'\c
213 .\}
214 .el \{\
215 .sp -1
216 .IP \(bu 2.3
217 .\}
218 Aurelien Foret <aurelien@archlinux\&.org>
219 .RE
220 .sp
221 .RS 4
222 .ie n \{\
223 \h'-04'\(bu\h'+03'\c
224 .\}
225 .el \{\
226 .sp -1
227 .IP \(bu 2.3
228 .\}
229 Aaron Griffin <aaron@archlinux\&.org>
230 .RE
231 .sp
232 .RS 4
233 .ie n \{\
234 \h'-04'\(bu\h'+03'\c
235 .\}
236 .el \{\
237 .sp -1
238 .IP \(bu 2.3
239 .\}
240 Dan McGee <dan@archlinux\&.org>
241 .RE
242 .sp
243 .RS 4
244 .ie n \{\
245 \h'-04'\(bu\h'+03'\c
246 .\}
247 .el \{\
248 .sp -1
249 .IP \(bu 2.3
250 .\}
251 Xavier Chantry <shiningxc@gmail\&.com>
252 .RE
253 .sp
254 .RS 4
255 .ie n \{\
256 \h'-04'\(bu\h'+03'\c
257 .\}
258 .el \{\
259 .sp -1
260 .IP \(bu 2.3
261 .\}
262 Nagy Gabor <ngaba@bibl\&.u\-szeged\&.hu>
263 .RE
264 .sp
265 .RS 4
266 .ie n \{\
267 \h'-04'\(bu\h'+03'\c
268 .\}
269 .el \{\
270 .sp -1
271 .IP \(bu 2.3
272 .\}
273 Dave Reisner <dreisner@archlinux\&.org>
274 .RE
275 .sp
276 .RS 4
277 .ie n \{\
278 \h'-04'\(bu\h'+03'\c
279 .\}
280 .el \{\
281 .sp -1
282 .IP \(bu 2.3
283 .\}
284 Eli Schwartz <eschwartz@archlinux\&.org>
285 .RE
286 .sp
287 For additional contributors, use git shortlog \-s on the pacman\&.git repository\&.