From 7c00466354e674c2ec7f30f1f79f9b6f8041f090 Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 1 Feb 2018 22:22:49 +0100 Subject: auto-patchelf: Error out if dep is unavailable We certainly don't want the builder to succeed if we're missing a dependency, so let's make sure the build is aborted (due to set -e) whenever that happens. Signed-off-by: aszlig --- pkgs/build-support/auto-patchelf/setup-hook.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/build-support/auto-patchelf/setup-hook.sh b/pkgs/build-support/auto-patchelf/setup-hook.sh index 51a6a888..0592e998 100644 --- a/pkgs/build-support/auto-patchelf/setup-hook.sh +++ b/pkgs/build-support/auto-patchelf/setup-hook.sh @@ -111,6 +111,8 @@ autoPatchelfFile() { @sed@ -n -e 's/^[\t ]*\([^ ]\+\) => not found.*/\1/p' )" + local -i depNotFound=0 + for dep in $missing; do echo -n " $dep -> " >&2 if findDependency "$dep" "$(getSoArch "$toPatch")"; then @@ -118,9 +120,12 @@ autoPatchelfFile() { echo "found: $foundDependency" >&2 else echo "not found!" >&2 + depNotFound=1 fi done + [ $depNotFound -eq 0 ] + if [ -n "$rpath" ]; then echo "setting RPATH to: $rpath" >&2 @patchelf@ --set-rpath "$rpath" "$toPatch" -- cgit 1.4.1