ALPM-PKGREL(7)

πŸ“¦ version 0.13.0, in arch rolling

πŸ’… ALPM-PKGREL β€” the manual page, but make it make sense

okay so real talk, bestie: this is from the Miscellaneous Information Manual, section 7, and the star of the show is pkgrel β€” the little version postfix that makes ALPM-based packages say "no actually, this one's newer." Let's get into it ✨


🌸 NAME 🌸

pkgrel β€” a version postfix that forces a higher version consideration for ALPM based packages. that's it, that's the vibe πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

So pkgrel is a version format, right? It gets used as a postfix to pkgver inside a composite version string. You'll see this format chillin' in build scripts, or in file formats that describe or reproduce package data β€” its whole job is to say "hey, this composite version (like BUILDINFO's pkgver, for example) should be considered newer than one with a lower pkgrel component." 🫢

Where does that actually matter? Distributions, babes. It's how you release a fresh new build of upstream software while still sitting on the same upstream release version. Every single rebuild? You bump the pkgrel value by 1. And the second the upstream version (the one pkgver represents) gets incremented β€” boom, pkgrel resets right back to 1. no cap πŸ”₯

Now the format rules, and yes there are rules:

  • the pkgrel value must be one or more numeric digits
  • it can optionally be followed by a period (.) and then one or more additional numeric digits
  • the default value when you're using pkgrel is 1 ⭐

And when it lives inside a composite version string, pkgver is directly followed by a - sign and then the pkgrel. that's the whole handshake 🀝

Here's the sorting tea β˜•: composite version strings that share the same pkgver component get sorted by their pkgrel. But β€” and this is the plot twist β€” epoch can still be used to set a higher ordering anyway. So the sorting precedence is:

epoch > pkgver > pkgrel

periodt. πŸ‘‘


🌈 EXAMPLES 🌈

Compositive version strings with the same pkgver component are sorted according to their pkgrel component. watch:

"1.0.0-1" < "1.0.0-2"
"1.0.0-1" < "1.0.0-1.0"
"1.0.0-1.0" < "1.0.0-2.0"

see how the numbers just keep climbing? iconic behavior, honestly πŸ’–

And an explicit epoch component is always considered before the pkgver and pkgrel components in a composite version string. so:

"1:1.0.0-1" > "1.0.0-2"

like, the epoch said what it said and it's not taking questions πŸ™ˆ


πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, bestie, they're all part of the lore:


k that's the whole page, mwah πŸ’‹ this was the Miscellaneous Information Manual, section (7) β€” go forth and bump your pkgrel responsibly, and remember: reset it to 1 when upstream moves, or the version gremlins will come for you πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from