#1125521 debootstrap: Fails to run on CachyOS due to multipl architectures defined in pacman.conf

Package:
debootstrap
Source:
debootstrap
Submitter:
Nickolai Mardanov
Date:
2026-01-15 13:11:01 UTC
Severity:
normal
Tags:
#1125521#5
Date:
2026-01-15 13:09:51 UTC
From:
To:
Dear Maintainer,

On CachyOS and non-standard Archlinux installations deboostrap would always fail with the following message:

Unknown architecture: x86_64
x86_64_v2
x86_64_v3
x86_64_v4

I'm including a patch that solves this issue
--- debootstrap	2026-01-15 16:37:07.647209522 +0400
+++ debootstrap-cachy	2026-01-15 16:42:36.823234564 +0400
@@ -569,7 +569,7 @@
 elif [ -e "$DEBOOTSTRAP_DIR/arch" ]; then
 	HOST_ARCH=$(cat "$DEBOOTSTRAP_DIR/arch")
 elif in_path pacman-conf; then
-       CARCH=$(pacman-conf Architecture)
+       CARCH=$(pacman-conf Architecture | head -n 1)
        case $CARCH in
                i686)    HOST_ARCH=i386 ;;
                x86_64)  HOST_ARCH=amd64 ;;