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,
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);

View File

@ -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'"

View File

@ -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() {