mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-11 01:07:46 +00:00
pveversion: sort kernel packages by version
instead of lexically by package name Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
373d7ea44e
commit
0459599d1a
@ -24,8 +24,8 @@ use JSON;
|
||||
use PVE::JSONSchema qw(get_standard_option);
|
||||
|
||||
use AptPkg::Cache;
|
||||
use AptPkg::Version;
|
||||
use AptPkg::PkgRecords;
|
||||
use Dpkg::Version;
|
||||
|
||||
my $get_apt_cache = sub {
|
||||
|
||||
@ -521,7 +521,8 @@ __PACKAGE__->register_method({
|
||||
# order most important things first
|
||||
my @list = qw(proxmox-ve pve-manager);
|
||||
|
||||
push @list, grep { /^pve-kernel-/ && $cache->{$_}->{CurrentState} eq 'Installed' } sort keys %$cache;
|
||||
my $byver = sub { version_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(
|
||||
ceph
|
||||
|
Loading…
Reference in New Issue
Block a user