Revert "xbps_init: autodetect musl libc variant at compile time."

This reverts commit 7f75fd840a.
This commit is contained in:
Duncan Overbruck 2021-02-04 22:40:09 +01:00
parent 6518107579
commit 93410bee7f
No known key found for this signature in database
GPG Key ID: 335C1D17EC3D6E35
3 changed files with 4 additions and 15 deletions

View File

@ -105,12 +105,6 @@ xbps_init(struct xbps_handle *xhp)
if (xbps_strlcpy(xhp->native_arch, un.machine, if (xbps_strlcpy(xhp->native_arch, un.machine,
sizeof xhp->native_arch) >= sizeof xhp->native_arch) sizeof xhp->native_arch) >= sizeof xhp->native_arch)
return ENOBUFS; 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); assert(*xhp->native_arch);

View File

@ -41,7 +41,7 @@ script_nargs_body() {
rval=0 rval=0
xbps-reconfigure -C empty.conf -r root -f A 2>out xbps-reconfigure -C empty.conf -r root -f A 2>out
out="$(cat 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 if [ "$out" != "$expected" ]; then
echo "out: '$out'" echo "out: '$out'"
echo "expected: '$expected'" echo "expected: '$expected'"

View File

@ -8,12 +8,7 @@ native_head() {
} }
native_body() { native_body() {
if $(ldd --version 2>&1|head -1|grep -q musl); then atf_check_equal $(xbps-uhelper -r $PWD arch) $(uname -m)
arch=$(uname -m)-musl
else
arch=$(uname -m)
fi
atf_check_equal $(xbps-uhelper -r $PWD arch) $arch
} }
atf_test_case env atf_test_case env
@ -33,8 +28,8 @@ conf_head() {
} }
conf_body() { conf_body() {
mkdir -p xbps.d mkdir -p xbps.d
echo "architecture=NULL" > xbps.d/arch.conf echo "architecture=x86_64-musl" > xbps.d/arch.conf
atf_check_equal $(xbps-uhelper -r $PWD -C $PWD/xbps.d arch) NULL atf_check_equal $(xbps-uhelper -C $PWD/xbps.d arch) x86_64-musl
} }
atf_init_test_cases() { atf_init_test_cases() {