Skip to content

[BUG]Unresolvable /usr/sbin conflict blocks all pacman package installations #36

Description

@9122

Hi dgateles,
I’m using your custom Arch-R distro for RK3326 handheld console, and I’ve encountered an unsolvable pacman file conflict dead loop. Here’s full context:
1.System background
This custom image pre-deploys all system binaries and hardware-specific configs (including /usr/sbin, ALSA sound driver profiles, xkeyboard-config layouts, udev touchscreen rules, systemd unit files, etc.) out of the box. However, none of these pre-existing files are registered into pacman’s local database /var/lib/pacman/local. Pacman treats all existing system files as unowned foreign files.

2.Core error & reproduction steps
Any pacman -S command will pull the base package filesystem as a mandatory dependency. The filesystem package contains the top-level system directory /usr/sbin, which already exists on the device from factory image. Pacman throws this error and aborts the whole transaction:

error: failed to commit transaction (conflicting files) filesystem: /usr/sbin exists in filesystem Errors occurred, no packages were upgraded.

This happens even when installing tiny packages like tar or zstd, since their dependency chain still includes filesystem.

3.All tried workarounds failed

  • Add --overwrite "*" to fully allow all conflicting files: pacman still hard-blocks the /usr/sbin directory conflict from filesystem, installation terminates anyway.
  • Try --ignore filesystem: filesystem is a hard dependency of glibc, libgcc, ncurses and all core system libraries. Ignoring it causes cascading missing dependency warnings and cannot resolve packages.
  • Old --force flag is removed in current pacman release, invalid.
  • PGP keyring & signature verification passes 100% every time; the failure only occurs at the "checking for file conflicts" stage, so signature/trust issues are ruled out.

4.Dead loop dilemma
To fix the mismatched pacman local database, I need to install pacman and pacman-contrib first. But installing those two packages will pull filesystem and trigger the same /usr/sbin conflict error, with no valid pacman flag to bypass this block.

Is there any built-in workaround, custom repo patch or prebuilt offline package script for this image to break this deadlock, so I can install XFCE and other software normally?

Thanks a lot.

Information

  • ArchR Version: [e.g. 20260526]
  • Hardware Platform: [e.g. R36S V12 P4]
  • I have resolved all signature verification issues and completed root partition expansion.

Log file

`localhost:/var/cache/pacman/pkg # pacman -S pacman pacman-contrib --noconfirm --overwrite '*'
resolving dependencies...
looking for conflicting packages...

Packages (109) acl-2.3.2-2 attr-2.5.2-2 audit-4.1.4-2 bash-5.3.15-1
binutils-2.46+r70+g155188ea10a7-1 brotli-1.2.0-1 bzip2-1.0.8-6
ca-certificates-20240618-1 ca-certificates-mozilla-3.125-1
ca-certificates-utils-20240618-1 coreutils-9.11-1
cryptsetup-2.8.6-1 curl-8.20.0-7 dbus-1.16.2-1
dbus-broker-37-3 dbus-broker-units-37-3 dbus-units-37-3
device-mapper-2.03.41-1 e2fsprogs-1.47.4-1 expat-2.8.1-1
file-5.48-1 filesystem-2025.10.12-1 findutils-4.10.0-3
gawk-5.4.0-1 gdbm-1.26-2 gettext-1.0-2 glib2-2.88.1-1
glibc-2.43+r22+g8362e8ce10b2-2 gmp-6.3.0-3
gnulib-l10n-20241231-1 gnupg-2.4.9-1 gnutls-3.8.13-2
gpgme-2.1.0-1 grep-3.12-2 gzip-1.14-2 hwdata-0.408-1
iana-etc-20260530-1 icu-78.3-1 jansson-2.15.0-1 json-c-0.18-2
kbd-2.10.0-1 keyutils-1.6.3-4 kmod-34.2-1 krb5-1.22.2-1
leancrypto-1.7.2-1 libarchive-3.8.7-1 libassuan-3.0.0-1
libcap-2.78-1 libcap-ng-0.9.3-1 libelf-0.195-1
libevent-2.1.12-5 libffi-3.5.2-1
libgcc-16.1.1+r12+g301eb08fa2c5-1 libgcrypt-1.12.2-1
libgomp-16.1.1+r12+g301eb08fa2c5-1 libgpg-error-1.61-1
libidn2-2.3.8-1 libksba-1.8.0-1 libldap-2.6.13-1
libmakepkg-dropins-20-1 libnghttp2-1.69.0-1
libnghttp3-1.16.0-1 libngtcp2-1.23.0-1 libnsl-2.0.1-2
libp11-kit-0.26.2-1 libpsl-0.21.5-2 libsasl-2.1.28-5
libseccomp-2.6.0-1 libsecret-0.21.7-1 libssh2-1.11.1-1
libstdc++-16.1.1+r12+g301eb08fa2c5-1
libsysprof-capture-50.0-2.1 libtasn1-4.21.0-1 libtirpc-1.3.7-1
libunistring-1.4.2-1 libusb-1.0.30-1 libverto-0.3.2-6
libxcrypt-4.5.2-1 libxml2-2.15.3-1 linux-api-headers-7.1-1
lmdb-0.9.35-1 lz4-1:1.10.0-2 mpfr-4.2.2-1 ncurses-6.6-2
nettle-4.0-1 npth-1.8-1 openssl-3.6.3-1 p11-kit-0.26.2-1
pacman-mirrorlist-20260411-2 pam-1.7.2-2 pambase-20260616-1
pcre2-10.47-1 pinentry-1.3.2-2 popt-1.19-2 readline-8.3.003-1
sed-4.10-1 shadow-4.19.4.arch1-1 sqlite-3.53.2-1
systemd-260.2-2 systemd-libs-260.2-2 tpm2-tss-4.1.3-1
tzdata-2026b-1 util-linux-2.42.2-1 util-linux-libs-2.42.2-1
xz-5.8.3-1 zlib-1:1.3.2-3 zstd-1.5.7-3
pacman-7.1.0.r9.g54d9411-2 pacman-contrib-1.13.1-1

Total Installed Size: 575.77 MiB

:: Proceed with installation? [Y/n]
(109/109) checking keys in keyring [######################] 100%
(109/109) checking package integrity [######################] 100%
(109/109) loading package files [######################] 100%
(109/109) checking for file conflicts [######################] 100%
error: failed to commit transaction (conflicting files)
filesystem: /usr/sbin exists in filesystem
Errors occurred, no packages were upgraded.
localhost:/var/cache/pacman/pkg # pacman -S tar zstd --noconfirm --overwrite '*'
resolving dependencies...
looking for conflicting packages...

Packages (16) acl-2.3.2-2 bash-5.3.15-1 filesystem-2025.10.12-1
glibc-2.43+r22+g8362e8ce10b2-2 iana-etc-20260530-1
libgcc-16.1.1+r12+g301eb08fa2c5-1
libstdc++-16.1.1+r12+g301eb08fa2c5-1 linux-api-headers-7.1-1
lz4-1:1.10.0-2 ncurses-6.6-2 readline-8.3.003-1 tzdata-2026b-1
xz-5.8.3-1 zlib-1:1.3.2-3 tar-1.35-2 zstd-1.5.7-3

Total Installed Size: 101.01 MiB

:: Proceed with installation? [Y/n]
(16/16) checking keys in keyring [######################] 100%
(16/16) checking package integrity [######################] 100%
(16/16) loading package files [######################] 100%
(16/16) checking for file conflicts [######################] 100%
error: failed to commit transaction (conflicting files)
filesystem: /usr/sbin exists in filesystem
Errors occurred, no packages were upgraded.
localhost:/var/cache/pacman/pkg # cp -r /usr/sbin /usr/sbin.bak
localhost:/var/cache/pacman/pkg # pacman -S pacman pacman-contrib --noconfirm --force
error: invalid option '--force'
localhost:/var/cache/pacman/pkg # pacman -S pacman pacman-contrib --noconfirm --overwrite "*"
resolving dependencies...
looking for conflicting packages...

Packages (109) acl-2.3.2-2 attr-2.5.2-2 audit-4.1.4-2 bash-5.3.15-1
binutils-2.46+r70+g155188ea10a7-1 brotli-1.2.0-1 bzip2-1.0.8-6
ca-certificates-20240618-1 ca-certificates-mozilla-3.125-1
ca-certificates-utils-20240618-1 coreutils-9.11-1
cryptsetup-2.8.6-1 curl-8.20.0-7 dbus-1.16.2-1
dbus-broker-37-3 dbus-broker-units-37-3 dbus-units-37-3
device-mapper-2.03.41-1 e2fsprogs-1.47.4-1 expat-2.8.1-1
file-5.48-1 filesystem-2025.10.12-1 findutils-4.10.0-3
gawk-5.4.0-1 gdbm-1.26-2 gettext-1.0-2 glib2-2.88.1-1
glibc-2.43+r22+g8362e8ce10b2-2 gmp-6.3.0-3
gnulib-l10n-20241231-1 gnupg-2.4.9-1 gnutls-3.8.13-2
gpgme-2.1.0-1 grep-3.12-2 gzip-1.14-2 hwdata-0.408-1
iana-etc-20260530-1 icu-78.3-1 jansson-2.15.0-1 json-c-0.18-2
kbd-2.10.0-1 keyutils-1.6.3-4 kmod-34.2-1 krb5-1.22.2-1
leancrypto-1.7.2-1 libarchive-3.8.7-1 libassuan-3.0.0-1
libcap-2.78-1 libcap-ng-0.9.3-1 libelf-0.195-1
libevent-2.1.12-5 libffi-3.5.2-1
libgcc-16.1.1+r12+g301eb08fa2c5-1 libgcrypt-1.12.2-1
libgomp-16.1.1+r12+g301eb08fa2c5-1 libgpg-error-1.61-1
libidn2-2.3.8-1 libksba-1.8.0-1 libldap-2.6.13-1
libmakepkg-dropins-20-1 libnghttp2-1.69.0-1
libnghttp3-1.16.0-1 libngtcp2-1.23.0-1 libnsl-2.0.1-2
libp11-kit-0.26.2-1 libpsl-0.21.5-2 libsasl-2.1.28-5
libseccomp-2.6.0-1 libsecret-0.21.7-1 libssh2-1.11.1-1
libstdc++-16.1.1+r12+g301eb08fa2c5-1
libsysprof-capture-50.0-2.1 libtasn1-4.21.0-1 libtirpc-1.3.7-1
libunistring-1.4.2-1 libusb-1.0.30-1 libverto-0.3.2-6
libxcrypt-4.5.2-1 libxml2-2.15.3-1 linux-api-headers-7.1-1
lmdb-0.9.35-1 lz4-1:1.10.0-2 mpfr-4.2.2-1 ncurses-6.6-2
nettle-4.0-1 npth-1.8-1 openssl-3.6.3-1 p11-kit-0.26.2-1
pacman-mirrorlist-20260411-2 pam-1.7.2-2 pambase-20260616-1
pcre2-10.47-1 pinentry-1.3.2-2 popt-1.19-2 readline-8.3.003-1
sed-4.10-1 shadow-4.19.4.arch1-1 sqlite-3.53.2-1
systemd-260.2-2 systemd-libs-260.2-2 tpm2-tss-4.1.3-1
tzdata-2026b-1 util-linux-2.42.2-1 util-linux-libs-2.42.2-1
xz-5.8.3-1 zlib-1:1.3.2-3 zstd-1.5.7-3
pacman-7.1.0.r9.g54d9411-2 pacman-contrib-1.13.1-1

Total Installed Size: 575.77 MiB

:: Proceed with installation? [Y/n]
(109/109) checking keys in keyring [######################] 100%
(109/109) checking package integrity [######################] 100%
(109/109) loading package files [######################] 100%
(109/109) checking for file conflicts [######################] 100%
error: failed to commit transaction (conflicting files)
filesystem: /usr/sbin exists in filesystem
Errors occurred, no packages were upgraded.`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions