pveversion: use AptPkg::Version, not Dpkg::Version
to avoid an extra dependency Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
50e0eebae5
commit
ee94b16ae5
@ -25,7 +25,7 @@ use PVE::JSONSchema qw(get_standard_option);
|
||||
|
||||
use AptPkg::Cache;
|
||||
use AptPkg::PkgRecords;
|
||||
use Dpkg::Version;
|
||||
use AptPkg::System;
|
||||
|
||||
my $get_apt_cache = sub {
|
||||
|
||||
@ -521,7 +521,8 @@ __PACKAGE__->register_method({
|
||||
# order most important things first
|
||||
my @list = qw(proxmox-ve pve-manager);
|
||||
|
||||
my $byver = sub { version_compare($cache->{$b}->{CurrentVer}->{VerStr}, $cache->{$a}->{CurrentVer}->{VerStr}) };
|
||||
my $aptver = $AptPkg::System::_system->versioning();
|
||||
my $byver = sub { $aptver->compare($cache->{$b}->{CurrentVer}->{VerStr}, $cache->{$a}->{CurrentVer}->{VerStr}) };
|
||||
push @list, sort $byver grep { /^pve-kernel-/ && $cache->{$_}->{CurrentState} eq 'Installed' } keys %$cache;
|
||||
|
||||
my @opt_pack = qw(
|
||||
|
Loading…
x
Reference in New Issue
Block a user