.TH "alpm-comparison" 7 .SH "NAME" .PP comparison \- comparison statements for ALPM based packages\. .SH "DESCRIPTION" .PP The \fBcomparison\fP 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\fP or \fBPKGINFO\fP) to describe version bounds for a \fBpackage relation\fP\. .PP A \fBcomparison\fP statement uses one of the following \fBcomparison\fP operators to specify a version bound relation: .RS .Bl .IP \(bu 4 `\f[CR]<\fP` (less than) .El .Bl .IP \(bu 4 `\f[CR]<=\fP` (less than or equal to) .El .Bl .IP \(bu 4 `\f[CR]=\fP` (equal to) .El .Bl .IP \(bu 4 `\f[CR]>=\fP` (greater than or equal to) .El .Bl .IP \(bu 4 `\f[CR]>\fP` (greater than) .El .RE .SS "Composite comparison expressions" .PP Composite comparison expressions consist of an \fBalpm\-package\-name\fP, directly followed by a \fBcomparison\fP operator, directly followed by an \fBalpm\-package\-version\fP\. .SS "Matching comparison expressions" .PP Name matching is performed based on a full string match using the \fBalpm\-package\-name\fP component of the composite comparison expression\. .PP Version comparison is performed based on components of a composite version string (see e\.g\. \fBalpm\-epoch\fP, \fBalpm\-pkgver\fP and \fBalpm\-pkgrel\fP)\. As \fBalpm\-package\-version\fP offers several forms, this allows for matching a variety of scenarios\. .PP When providing the \fIfull\fP or \fIfull with epoch\fP form of the \fBalpm\-package\-version\fP format, it matches \fIexactly one\fP specific release of a package version\. When providing the \fIminimal\fP or \fIminimal with epoch\fP form of the \fBalpm\-package\-version\fP format, it matches \fIany\fP release of a package version\. .PP Depending on comparison operator, the given match towards \fBalpm\-package\-name\fP and \fBalpm\-package\-version\fP is narrow (i\.e\. `\f[CR]=\fP`), wide with lower bound (i\.e\. `\f[CR]>\fP`, `\f[CR]>=\fP`) or wide with upper bound (i\.e\. `\f[CR]<\fP`, `\f[CR]<=\fP`)\. .SH "EXAMPLES" .PP The below composite comparison expressions can be matched by a package named `\f[CR]example\fP` in specific versions: .RS .PP .nf "example<1\.0\.0" .fi .RE .PP A version less than '1\.0\.0' (e\.g\. '0\.8\.0\-1')\. .RS .PP .nf "example<=1\.0\.0" .fi .RE .PP A version less than or equal to '1\.0\.0' (e\.g\. '0\.8\.0\-1' or '1\.0\.0\-3')\. .RS .PP .nf "example<=1\.0\.0\-1" .fi .RE .PP A version less than or equal to '1\.0\.0\-1' (e\.g\. '0\.8\.0\-1' or '1\.0\.0\-1', but '1\.0\.0\-2' does not work)\. .RS .PP .nf "example=1\.0\.0" .fi .RE .PP Any version '1\.0\.0' (e\.g\. '1\.0\.0\-1' or '1\.0\.0\-2', etc\.)\. .RS .PP .nf "example=1\.0\.0\-1" .fi .RE .PP The version '1\.0\.0\-1'\. .RS .PP .nf "example=1:1\.0\.0\-1" .fi .RE .PP The version '1:1\.0\.0\-1'\. .RS .PP .nf "example>=1\.0\.0" .fi .RE .PP A version greater than or equal to '1\.0\.0' (e\.g\. '1\.0\.0\-1' or '1\.1\.0\-1')\. .RS .PP .nf "example>1\.0\.0" .fi .RE .PP A version greater than '1\.0\.0' (e\.g\. '1\.1\.0\-1' or '1:1\.0\.0\-1')\. .SH "SEE ALSO" .PP \fBBUILDINFO\fP(5), \fBPKGBUILD\fP(5), \fBPKGINFO\fP(5), \fBalpm\-epoch\fP(7), \fBalpm\-package\-name\fP(7), \fBalpm\-package\-relation\fP(7), \fBalpm\-package\-version\fP(7), \fBalpm\-pkgrel\fP(7), \fBalpm\-pkgver\fP(7), \fBvercmp\fP(8)