From 5c211c6df259d5ba577e326751c4f4d40161679d Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Tue, 6 Oct 2026 16:48:14 +0200 Subject: [PATCH] Check the architecture on Incus hosts too Incus stubbed arch_check out on the belief that it runs containers of other architectures. It cannot (containers share the host kernel), so on an arm64 host the scripts marked var_arm64=no went ahead and failed on a missing image or an x86-only binary. arch_check falls back to uname -m when the host has no dpkg. --- core/core.func | 6 +++++- incus/build.func | 1 - incus/core.func | 3 --- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/core.func b/core/core.func index f1a3cb3..4f71369 100644 --- a/core/core.func +++ b/core/core.func @@ -739,7 +739,11 @@ pmxcfs_check() { # ------------------------------------------------------------------------------ arch_check() { local arch - arch="$(dpkg --print-architecture)" + arch="$(dpkg --print-architecture 2>/dev/null || uname -m)" + case "$arch" in + x86_64) arch="amd64" ;; + aarch64) arch="arm64" ;; + esac if [[ "$arch" != "amd64" && "$arch" != "arm64" ]]; then msg_error "This script requires amd64 or arm64 (detected: $arch)." sleep 2 diff --git a/incus/build.func b/incus/build.func index 2af2749..327293e 100644 --- a/incus/build.func +++ b/incus/build.func @@ -307,7 +307,6 @@ pve_check() { fi incus_check } -arch_check() { :; } arm64_notice() { :; } ssh_check() { :; } diff --git a/incus/core.func b/incus/core.func index 35c362b..da0a6d2 100644 --- a/incus/core.func +++ b/incus/core.func @@ -283,9 +283,6 @@ incus_check() { fi } -# Incus handles cross-architecture natively (e.g. x86 host running ARM containers). -# No arch_check needed - removed from Incus scripts. - # ============================================================================== # SECTION 3: EXECUTION HELPERS # ==============================================================================