Skip to content

Commit

Permalink
packager: fetch glibc corresponding to the architecture (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
keshayad authored May 11, 2021
1 parent aa351a6 commit 5959e2f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packaging/packager
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ 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.;
Expand Down Expand Up @@ -73,8 +74,8 @@ function package_libc_via_dpkg() {

function package_libc_via_rpm() {
if type rpm > /dev/null 2>&1; then
if [[ $(rpm --query --list glibc.x86_64 | wc -l) -gt 1 ]]; then
rpm --query --list glibc.x86_64 | sed -E '/\.so$|\.so\.[0-9]+$/!d'
if [[ $(rpm --query --list glibc.$architecture | wc -l) -gt 1 ]]; then
rpm --query --list glibc.$architecture | sed -E '/\.so$|\.so\.[0-9]+$/!d'
fi
fi
}
Expand Down

0 comments on commit 5959e2f

Please sign in to comment.