pkgfile icon indicating copy to clipboard operation
pkgfile copied to clipboard

pacman.conf multi-valued Architecture is incorrectly handled

Open eli-schwartz opened this issue 4 years ago • 0 comments

In pacman-git, I can do this:

$ pacman-conf Architecture
x86_64
x86_64_v3

And it will work, pending Arch actually implementing optimized repos for the v3 psABI discussed at e.g. https://www.phoronix.com/scan.php?page=news_item&px=GCC-11-x86-64-Feature-Levels and accepted at https://gitlab.archlinux.org/archlinux/rfcs/-/merge_requests/2

However, pkgfile's string parsing turns this into:

warning: download failed: http://arch.mirror.constant.com/extra/os/x86_64 x86_64_v3/extra.files [error 404]
warning: download failed: http://arch.mirror.constant.com/community-testing/os/x86_64 x86_64_v3/community-testing.files [error 404]
warning: download failed: http://arch.mirror.constant.com/community/os/x86_64 x86_64_v3/community.files [error 404]
warning: download failed: http://arch.mirror.constant.com/multilib-testing/os/x86_64 x86_64_v3/multilib-testing.files [error 404]
warning: download failed: http://arch.mirror.constant.com/testing/os/x86_64 x86_64_v3/testing.files [error 404]
warning: download failed: http://arch.mirror.constant.com/multilib/os/x86_64 x86_64_v3/multilib.files [error 404]
warning: download failed: http://arch.mirror.constant.com/core/os/x86_64 x86_64_v3/core.files [error 404]

Per the feature addition: https://git.archlinux.org/pacman.git/commit/?id=3179db108a83104d9de6d1d607f55f8118e92160

We use the first specified Architecture value in mirrorlist $arch variable replacement, as this is backwards-compatible and sane.

pkgfile should drop everything after the first whitespace when getting the value.

eli-schwartz avatar May 06 '21 21:05 eli-schwartz