ALPM-COMPARISON(7)
β¨ NAME β¨
comparison β the comparison statements for ALPM based packages, bestie. it's giving "how do i say this package needs to be at least this version" energy π
πΈ DESCRIPTION πΈ
okay so. the comparison format is a version comparison format, and what that means is it's the lil language we use to write down version comparison statements for ALPM based packages inside a bigger thing called a composite comparison expression. literally everywhere. you'll see this format in build scripts or in file formats for package metadata (think PKGBUILD or PKGINFO) whenever something needs to describe version bounds for a package relation. no cap π₯
a comparison statement uses one of these comparison operators to say what the version bound relation is:
<(less than)<=(less than or equal to)=(equal to)>=(greater than or equal to)>(greater than)
π¦ Composite comparison expressions π¦
so a composite comparison expression is just three things glued together with zero spaces, in this exact order:
- an
alpm-package-name - directly followed by a comparison operator
- directly followed by an
alpm-package-version
that's it. that's the whole vibe. it's giving "no breathing room, we're efficient here" β¨
π Matching comparison expressions π
Name matching is a full string match, using the alpm-package-name component of the composite comparison expression. like, exact. no fuzzy wuzzy π
Version comparison works off the components of a composite version string (see e.g. alpm-epoch, alpm-pkgver and alpm-pkgrel). and because alpm-package-version offers several forms, you can match a whole variety of scenarios. iconic, honestly π
- when you provide the full or full with epoch form of the
alpm-package-versionformat, it matches exactly one specific release of a package version π― - when you provide the minimal or minimal with epoch form of the
alpm-package-versionformat, it matches any release of a package version π
and depending on which comparison operator you picked, the match towards alpm-package-name and alpm-package-version is one of three flavours:
- narrow β i.e.
= - wide with lower bound β i.e.
>,>= - wide with upper bound β i.e.
<,<=
periodt. π
π₯ EXAMPLES π₯
these composite comparison expressions below can be matched by a package named example in specific versions. watch this:
"example<1.0.0"
A version less than β1.0.0β (e.g. β0.8.0-1β).
"example<=1.0.0"
A version less than or equal to β1.0.0β (e.g. β0.8.0-1β or β1.0.0-3β).
"example<=1.0.0-1"
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).
"example=1.0.0"
Any version β1.0.0β (e.g. β1.0.0-1β or β1.0.0-2β, etc.).
"example=1.0.0-1"
The version β1.0.0-1β.
"example=1:1.0.0-1"
The version β1:1.0.0-1β.
"example>=1.0.0"
A version greater than or equal to β1.0.0β (e.g. β1.0.0-1β or β1.1.0-1β).
"example>1.0.0"
A version greater than β1.0.0β (e.g. β1.1.0-1β or β1:1.0.0-1β).
ngl the<=1.0.0-1one is my fave because β1.0.0-2β does not work and that lil detail is the whole personality of the example π
π«Ά SEE ALSO π«Ά
BUILDINFO(5), PKGBUILD(5), PKGINFO(5), alpm-epoch(7), alpm-package-name(7), alpm-package-relation(7), alpm-package-version(7), alpm-pkgrel(7), alpm-pkgver(7), vercmp(8)
go read those too, they're all part of the same friend group π
okay that's the whole page!! this one lives in section 7 of the Miscellaneous Information Manual, and yeah the footer is just that lone (7) β she's lowkey minimal, we love her for it πβ¨π
π¦ where this page comes from
- arch rolling: alpm-docs 0.13.0-1 Β· CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms