pve-manager/PVE/pvecfg.pm.in
Thomas Lamprecht b597d23d35 pvecfg: adapt version and release semantic
Wit commit bcef9bde68a920a4d204beb8ec1d5f334f7fbb78 we switched over
to using the dpkg-dev provided helpers to set package version,
architecture and such in the buildsystem.

But unlike other repositories we used the version also for giving it
back over the API through the during build generated PVE::pvecfg
module, which wasn't fully updated to the new style.

This patch does that, and also cleans up semantics a bit, the
following two changed:

release is now the Debian release, instead of the "package release"
(i.e., the -X part of a full package version).
version is now simply the full (pve-manager) version, e.g., 6.0-1 or
the currently for testing used 6.0-0+1

This allows to do everything we used this information for even in a
slightly easier way (no  string concat needed anymore), and fits also
with the terminology we often used in our public channels (mailing
lists, forum, website)

Remove some cruft as we touch things.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2019-05-26 16:11:43 +02:00

36 lines
425 B
Perl

package PVE::pvecfg;
use strict;
use warnings;
sub package {
return '@PACKAGE@';
}
sub version {
return '@VERSION@';
}
sub release {
return '@PVERELEASE@';
}
sub repoid {
return '@REPOID@';
}
sub version_text {
return '@VERSION@/@REPOID@';
}
# this is returned by the API
sub version_info {
return {
'version' => '@VERSION@',
'release' => '@PVERELEASE@',
'repoid' => '@REPOID@',
}
}
1;