'\" t .\" Title: vercmp .\" Author: [see the "Authors" section] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 2023-08-16 .\" Manual: Pacman Manual .\" Source: Pacman 6.0.2 .\" Language: English .\" .TH "VERCMP" "8" "2023\-08\-16" "Pacman 6\&.0\&.2" "Pacman Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" vercmp \- version comparison utility .SH "SYNOPSIS" .sp \fIvercmp\fR [\-h] [\-\-help] .SH "DESCRIPTION" .sp \fIvercmp\fR is used to determine the relationship between two given version numbers\&. It outputs values as follows: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} < 0 : if ver1 < ver2 .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} = 0 : if ver1 == ver2 .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} > 0 : if ver1 > ver2 .RE .sp Version comparison operates as follows: .sp .if n \{\ .RS 4 .\} .nf Alphanumeric: 1\&.0a < 1\&.0b < 1\&.0beta < 1\&.0p < 1\&.0pre < 1\&.0rc < 1\&.0 < 1\&.0\&.a < 1\&.0\&.1 Numeric: 1 < 1\&.0 < 1\&.1 < 1\&.1\&.1 < 1\&.2 < 2\&.0 < 3\&.0\&.0 .fi .if n \{\ .RE .\} .sp 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\&. .sp 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\&. .SH "OPTIONS" .PP \fB\-h, \-\-help\fR .RS 4 Display summary of the available return codes\&. Must be the first option specified\&. .RE .SH "EXAMPLES" .sp .if n \{\ .RS 4 .\} .nf $ vercmp 1 2 \-1 .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf $ vercmp 2 1 1 .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf $ vercmp 2\&.0\-1 1\&.7\-6 1 .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf $ vercmp 2\&.0 2\&.0\-13 0 .fi .if n \{\ .RE .\} .sp .if n \{\ .RS 4 .\} .nf $ vercmp 4\&.34 1:001 \-1 .fi .if n \{\ .RE .\} .SH "SEE ALSO" .sp \fBpacman\fR(8), \fBmakepkg\fR(8), \fBlibalpm\fR(3) .sp See the pacman website at https://archlinux\&.org/pacman/ for current information on pacman and its related tools\&. .SH "BUGS" .sp Bugs? You must be kidding; there are no bugs in this software\&. But if we happen to be wrong, submit a bug report with as much detail as possible at the Arch Linux Bug Tracker in the Pacman section\&. .SH "AUTHORS" .sp Current maintainers: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Allan McRae .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Andrew Gregory .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Eli Schwartz .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Morgan Adamiec .RE .sp Past major contributors: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Judd Vinet .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Aurelien Foret .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Aaron Griffin .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Dan McGee .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Xavier Chantry .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Nagy Gabor .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Dave Reisner .RE .sp For additional contributors, use git shortlog \-s on the pacman\&.git repository\&.