[pve-devel] applied: [PATCH manager] pveversion: use AptPkg::Version, not Dpkg::Version

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Feb 16 15:11:35 CET 2018


applied

On Fri, Feb 16, 2018 at 02:58:10PM +0100, Fabian Grünbichler wrote:
> to avoid an extra dependency
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
>  PVE/API2/APT.pm | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/API2/APT.pm b/PVE/API2/APT.pm
> index 1199c204..f5709747 100644
> --- a/PVE/API2/APT.pm
> +++ b/PVE/API2/APT.pm
> @@ -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(
> -- 
> 2.14.2




More information about the pve-devel mailing list