Home

pkgversion

Pkgversion, commonly referred to in packaging documentation as pkgver, is the version string used in a package’s metadata to identify the packaged artifact. It is distinct from the upstream project's version and is used to reflect changes made during packaging, such as patches, metadata adjustments, or packaging-specific revisions.

In practice, the pkgver is part of the information shown to users and consumed by package managers

In Arch Linux and its PKGBUILD system, the version is stored in the pkgver variable, and a

A typical packaging workflow involves updating pkgver to match a new upstream tag or using a pkgver()

The concept of a packaged version is common across packaging ecosystems, though exact field names vary. The

to
determine
upgrades.
Package
managers
compare
the
current
installed
version
with
the
available
pkgver
to
decide
whether
an
update
is
needed.
The
version
string
must
increase
monotonically
compared
with
previously
built
packages
to
ensure
reliable
upgrade
paths.
separate
pkgrel
variable
captures
the
release
number
of
the
packaging
itself.
When
the
upstream
software
releases
a
new
version,
maintainers
typically
set
pkgver
to
the
new
upstream
version
(and
may
adjust
with
patches
or
an
epoch).
If
only
packaging
changes
occur
without
upstream
updates,
they
usually
increase
pkgrel
while
keeping
the
upstream
portion
of
the
version
the
same.
function
to
compute
the
appropriate
value
automatically.
The
release
number
(pkgrel)
is
bumped
for
packaging
changes
that
do
not
alter
the
upstream
version,
signaling
a
new
packaged
build
to
users.
core
idea
is
to
provide
a
single,
monotonic
version
string
that
drives
upgrades
and
reflects
both
upstream
and
packaging
changes.
Some
references
may
use
the
term
pkgversion
to
describe
this
concept,
but
the
canonical
variable
name
in
Arch
packaging
is
pkgver.