Skip to content

Commit

Permalink
setup-hooks: do not pass missing dirs to find (close #15405)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
layus authored and vcunat committed May 22, 2016
1 parent 70cecb9 commit bfd522d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkgs/build-support/setup-hooks/separate-debug-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/tools/misc/patchelf/setup-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bfd522d

Please sign in to comment.