diff options
author | aszlig <aszlig@nix.build> | 2018-02-01 22:22:49 +0100 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2018-02-01 22:28:33 +0100 |
commit | 7c00466354e674c2ec7f30f1f79f9b6f8041f090 (patch) | |
tree | 757b0198cb73c98e5b897c867aa8187c3ea33878 | |
parent | 8b918f954397fff4718efd8960a46c763c982eff (diff) |
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 <aszlig@nix.build>
-rw-r--r-- | pkgs/build-support/auto-patchelf/setup-hook.sh | 5 |
1 files changed, 5 insertions, 0 deletions
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" |