[pve-devel] applied: [PATCH v2 container 02/11] Move LXC-specific architecture translation here

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Oct 29 06:56:26 CET 2019


On 10/28/19 12:59 PM, Stefan Reiter wrote:
> This is the only time we need to do this translation, moving it here
> allows reuse of the PVE::Tools function.
> 
> Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
> ---
>  src/PVE/LXC/Setup.pm | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/src/PVE/LXC/Setup.pm b/src/PVE/LXC/Setup.pm
> index 845aced..ca6fc4f 100644
> --- a/src/PVE/LXC/Setup.pm
> +++ b/src/PVE/LXC/Setup.pm
> @@ -293,6 +293,15 @@ sub pre_start_hook {
>  
>      my $host_arch = PVE::Tools::get_host_arch();
>  
> +    # containers use different architecture names
> +    if ($host_arch eq 'x86_64') {
> +	$host_arch = 'amd64';
> +    } elsif ($host_arch eq 'aarch64') {
> +	$host_arch = 'arm64';
> +    } else {
> +	die "unsupported host architecture '$host_arch'\n";
> +    }
> +
>      my $container_arch = $self->{conf}->{arch};
>  
>      $container_arch = 'amd64' if $container_arch eq 'i386'; # always use 64 bit version
> 

applied, at least this does not needs the common change, else we'd
have a full breaks-depends again ^^ A single breaks is way easier
to deal with :)




More information about the pve-devel mailing list