From 93410bee7f241cc5963755cac2ef8ea6f8dd6881 Mon Sep 17 00:00:00 2001 From: Duncan Overbruck Date: Thu, 4 Feb 2021 22:40:09 +0100 Subject: [PATCH] Revert "xbps_init: autodetect musl libc variant at compile time." This reverts commit 7f75fd840a15f24a8a88ec1dbd568a3c1ceea133. --- lib/initend.c | 6 ------ tests/xbps/libxbps/shell/scripts_test.sh | 2 +- tests/xbps/xbps-uhelper/arch_test.sh | 11 +++-------- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/lib/initend.c b/lib/initend.c index a991a851..48073800 100644 --- a/lib/initend.c +++ b/lib/initend.c @@ -105,12 +105,6 @@ xbps_init(struct xbps_handle *xhp) if (xbps_strlcpy(xhp->native_arch, un.machine, sizeof xhp->native_arch) >= sizeof xhp->native_arch) return ENOBUFS; -#if defined(__linux__) && !defined(__GLIBC__) - /* musl libc on linux, just append -musl */ - if (xbps_strlcat(xhp->native_arch, "-musl", - sizeof xhp->native_arch) >= sizeof xhp->native_arch) - return ENOBUFS; -#endif } assert(*xhp->native_arch); diff --git a/tests/xbps/libxbps/shell/scripts_test.sh b/tests/xbps/libxbps/shell/scripts_test.sh index 862e30ec..9c6763d5 100644 --- a/tests/xbps/libxbps/shell/scripts_test.sh +++ b/tests/xbps/libxbps/shell/scripts_test.sh @@ -41,7 +41,7 @@ script_nargs_body() { rval=0 xbps-reconfigure -C empty.conf -r root -f A 2>out out="$(cat out)" - expected="post A 1.0_1 no no $(xbps-uhelper arch)" + expected="post A 1.0_1 no no $(uname -m)" if [ "$out" != "$expected" ]; then echo "out: '$out'" echo "expected: '$expected'" diff --git a/tests/xbps/xbps-uhelper/arch_test.sh b/tests/xbps/xbps-uhelper/arch_test.sh index 80d9a4de..5784b81c 100644 --- a/tests/xbps/xbps-uhelper/arch_test.sh +++ b/tests/xbps/xbps-uhelper/arch_test.sh @@ -8,12 +8,7 @@ native_head() { } native_body() { - if $(ldd --version 2>&1|head -1|grep -q musl); then - arch=$(uname -m)-musl - else - arch=$(uname -m) - fi - atf_check_equal $(xbps-uhelper -r $PWD arch) $arch + atf_check_equal $(xbps-uhelper -r $PWD arch) $(uname -m) } atf_test_case env @@ -33,8 +28,8 @@ conf_head() { } conf_body() { mkdir -p xbps.d - echo "architecture=NULL" > xbps.d/arch.conf - atf_check_equal $(xbps-uhelper -r $PWD -C $PWD/xbps.d arch) NULL + echo "architecture=x86_64-musl" > xbps.d/arch.conf + atf_check_equal $(xbps-uhelper -C $PWD/xbps.d arch) x86_64-musl } atf_init_test_cases() {