diff options
author | Guillaume Maudoux <layus.on@gmail.com> | 2016-05-12 12:18:59 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2016-05-22 12:08:01 +0200 |
commit | bfd522da633bd904918a939b29f0a0ebb594fa6b (patch) | |
tree | e74d4bf90e5b373a81f0fd1bf33a79f9aea1cfb8 | |
parent | 70cecb9cbdc7684885e348e2e82308f8da373953 (diff) | |
download | nixlib-bfd522da633bd904918a939b29f0a0ebb594fa6b.tar nixlib-bfd522da633bd904918a939b29f0a0ebb594fa6b.tar.gz nixlib-bfd522da633bd904918a939b29f0a0ebb594fa6b.tar.bz2 nixlib-bfd522da633bd904918a939b29f0a0ebb594fa6b.tar.lz nixlib-bfd522da633bd904918a939b29f0a0ebb594fa6b.tar.xz nixlib-bfd522da633bd904918a939b29f0a0ebb594fa6b.tar.zst nixlib-bfd522da633bd904918a939b29f0a0ebb594fa6b.zip |
setup-hooks: do not pass missing dirs to find (close #15405)
find fails when called with an inexistent search path. That situation may arise when the output is created after by a postFixup hook. vcunat amended the PR by clarifying one more `return` to `return 0`.
-rw-r--r-- | pkgs/build-support/setup-hooks/separate-debug-info.sh | 4 | ||||
-rw-r--r-- | pkgs/development/tools/misc/patchelf/setup-hook.sh | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/build-support/setup-hooks/separate-debug-info.sh b/pkgs/build-support/setup-hooks/separate-debug-info.sh index 518be9647334..c90d2cd52013 100644 --- a/pkgs/build-support/setup-hooks/separate-debug-info.sh +++ b/pkgs/build-support/setup-hooks/separate-debug-info.sh @@ -6,8 +6,10 @@ dontStrip=1 fixupOutputHooks+=(_separateDebugInfo) _separateDebugInfo() { + [ -e "$prefix" ] || return 0 + local dst="${debug:-$out}" - if [ "$prefix" = "$dst" ]; then return; fi + if [ "$prefix" = "$dst" ]; then return 0; fi dst="$dst/lib/debug/.build-id" diff --git a/pkgs/development/tools/misc/patchelf/setup-hook.sh b/pkgs/development/tools/misc/patchelf/setup-hook.sh index 563ef57fce11..bc1cddd4879c 100644 --- a/pkgs/development/tools/misc/patchelf/setup-hook.sh +++ b/pkgs/development/tools/misc/patchelf/setup-hook.sh @@ -6,6 +6,8 @@ fixupOutputHooks+=('if [ -z "$dontPatchELF" ]; then patchELF "$prefix"; fi') patchELF() { local dir="$1" + [ -e "$dir" ] || return 0 + header "shrinking RPATHs of ELF executables and libraries in $dir" local i |