[pve-devel] applied: [PATCH stable-5 manager 2/3] pve5to6: add check for stock debian kernel package

Thomas Lamprecht t.lamprecht at proxmox.com
Tue May 12 19:16:54 CEST 2020


On 5/12/20 12:11 PM, Dominik Csapak wrote:
> on current debian buster, stock kernel images recommend
> firmware-linux-free which conflict with our pve-firmware package
> which leads to apt wanting to remove promxox-ve
> 
> check for the meta package in the update check script
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  PVE/CLI/pve5to6.pm | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/PVE/CLI/pve5to6.pm b/PVE/CLI/pve5to6.pm
> index 42c41bbd..01a3a819 100644
> --- a/PVE/CLI/pve5to6.pm
> +++ b/PVE/CLI/pve5to6.pm
> @@ -19,6 +19,7 @@ use PVE::Storage;
>  use PVE::Tools qw(run_command $IPV4RE $IPV6RE);
>  use PVE::QemuServer;
>  
> +use AptPkg::Cache;
>  use Socket qw(AF_INET AF_INET6 inet_ntop);
>  use Term::ANSIColor;
>  
> @@ -249,6 +250,19 @@ sub check_pve_packages {
>  	} else {
>  	    log_warn("unexpected running and installed kernel '$kernel_ver'.");
>  	}
> +
> +    }
> +    print "\nChecking for installed Debian Kernel..\n";
> +    if(my $apt_cache = AptPkg::Cache->new()) {
> +	my $p = $apt_cache->{'linux-image-amd64'};
> +	if ($p && $p->{SelectedState} eq 'Install') {
> +	    log_fail("Stock Debian kernel package installed. Please remove package 'linux-image-amd64'.");
> +	} else {
> +	    log_pass("Stock Debian kernel package not installed.");
> +	}
> +
> +    } else {
> +	log_fail("unable to initialize AptPkg::Cache\n");
>      }
>  }
>  
> 



applied, moving the "get state from package" out in it's own method to make this
more clean and easier to read.




More information about the pve-devel mailing list