From f42d024063be262458c9fab0a514af86c980c330 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Fri, 1 Oct 2021 15:21:58 -0700 Subject: [PATCH] packager: fetch glibc corresponding to the host architecture on debian multiarch --- packaging/packager | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packaging/packager b/packaging/packager index ab27526..3a15f00 100755 --- a/packaging/packager +++ b/packaging/packager @@ -45,7 +45,6 @@ done set -- "${POSITIONAL[@]}" # restore positional parameters PKG_BIN_PATH=$1 -architecture=$(arch) if [ ! -f "$PKG_BIN_PATH" ]; then echo "$PKG_BIN_PATH" - No such file.; @@ -66,14 +65,16 @@ function package_libc_via_pacman { function package_libc_via_dpkg() { if type dpkg-query > /dev/null 2>&1; then - if [[ $(dpkg-query --listfiles libc6 | wc -l) -gt 0 ]]; then - dpkg-query --listfiles libc6 | sed -E '/\.so$|\.so\.[0-9]+$/!d' + architecture=$(dpkg --print-architecture) + if [[ $(dpkg-query --listfiles libc6:$architecture | wc -l) -gt 0 ]]; then + dpkg-query --listfiles libc6:$architecture | sed -E '/\.so$|\.so\.[0-9]+$/!d' fi fi } function package_libc_via_rpm() { if type rpm > /dev/null 2>&1; then + architecture=$(arch) if [[ $(rpm --query --list glibc.$architecture | wc -l) -gt 1 ]]; then rpm --query --list glibc.$architecture | sed -E '/\.so$|\.so\.[0-9]+$/!d' fi