1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 15:11:35 +00:00

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`.
This commit is contained in:
Guillaume Maudoux 2016-05-12 12:18:59 +02:00 committed by Vladimír Čunát
parent 70cecb9cbd
commit bfd522da63
2 changed files with 5 additions and 1 deletions

View file

@ -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"

View file

@ -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