.\" -*- mode: troff; coding: utf-8 -*- .TH "" "7" "" .SH NAME .LP comparison - comparison statements for ALPM based packages. .SH DESCRIPTION .LP The \fBcomparison\fR format is a version comparison format, that is used for representing version comparison statements for ALPM based packages in a composite comparison expression. This format is used in build scripts or file formats for package metadata (e.g. in \fBPKGBUILD\fR or \fBPKGINFO\fR) to describe version bounds for a \fBpackage relation\fR. .PP A \fBcomparison\fR statement uses one of the following \fBcomparison\fR operators to specify a version bound relation: .IP "\(bu" 3 \f(CR<\fR (less than) .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \f(CR<=\fR (less than or equal to) .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \f(CR=\fR (equal to) .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \f(CR>=\fR (greater than or equal to) .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \f(CR>\fR (greater than) .SS Composite comparison expressions .LP Composite comparison expressions consist of an \fBalpm-package-name\fR, directly followed by a \fBcomparison\fR operator, directly followed by an \fBalpm-package-version\fR. .SS Matching comparison expressions .LP Name matching is performed based on a full string match using the \fBalpm-package-name\fR component of the composite comparison expression. .PP Version comparison is performed based on components of a composite version string (see e.g. \fBalpm-epoch\fR, \fBalpm-pkgver\fR and \fBalpm-pkgrel\fR). As \fBalpm-package-version\fR offers several forms, this allows for matching a variety of scenarios. .PP When providing the \fIfull\fR or \fIfull with epoch\fR form of the \fBalpm-package-version\fR format, it matches \fIexactly one\fR specific release of a package version. When providing the \fIminimal\fR or \fIminimal with epoch\fR form of the \fBalpm-package-version\fR format, it matches \fIany\fR release of a package version. .PP Depending on comparison operator, the given match towards \fBalpm-package-name\fR and \fBalpm-package-version\fR is narrow (i.e. \f(CR=\fR), wide with lower bound (i.e. \f(CR>\fR, \f(CR>=\fR) or wide with upper bound (i.e. \f(CR<\fR, \f(CR<=\fR). .SH EXAMPLES .LP The below composite comparison expressions can be matched by a package named \f(CRexample\fR in specific versions: .LP .EX \(dqexample<1.0.0\(dq .EE .PP A version less than \(oq1.0.0\(cq (e.g. \(oq0.8.0-1\(cq). .LP .EX \(dqexample<=1.0.0\(dq .EE .PP A version less than or equal to \(oq1.0.0\(cq (e.g. \(oq0.8.0-1\(cq or \(oq1.0.0-3\(cq). .LP .EX \(dqexample<=1.0.0-1\(dq .EE .PP A version less than or equal to \(oq1.0.0-1\(cq (e.g. \(oq0.8.0-1\(cq or \(oq1.0.0-1\(cq, but \(oq1.0.0-2\(cq does not work). .LP .EX \(dqexample=1.0.0\(dq .EE .PP Any version \(oq1.0.0\(cq (e.g. \(oq1.0.0-1\(cq or \(oq1.0.0-2\(cq, etc.). .LP .EX \(dqexample=1.0.0-1\(dq .EE .PP The version \(oq1.0.0-1\(cq. .LP .EX \(dqexample=1:1.0.0-1\(dq .EE .PP The version \(oq1:1.0.0-1\(cq. .LP .EX \(dqexample>=1.0.0\(dq .EE .PP A version greater than or equal to \(oq1.0.0\(cq (e.g. \(oq1.0.0-1\(cq or \(oq1.1.0-1\(cq). .LP .EX \(dqexample>1.0.0\(dq .EE .PP A version greater than \(oq1.0.0\(cq (e.g. \(oq1.1.0-1\(cq or \(oq1:1.0.0-1\(cq). .SH SEE ALSO .LP \fBBUILDINFO\fR(5), \fBPKGBUILD\fR(5), \fBPKGINFO\fR(5), \fBalpm-epoch\fR(7), \fBalpm-package-name\fR(7), \fBalpm-package-relation\fR(7), \fBalpm-package-version\fR(7), \fBalpm-pkgrel\fR(7), \fBalpm-pkgver\fR(7), \fBvercmp\fR(8)