diff options
author | Tim Niemeyer <tim.niemeyer@corscience.de> | 2014-09-02 16:35:12 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2014-09-04 12:17:22 +0200 |
commit | 8545abb6515b76f40b39c536a758b21ba670327e (patch) | |
tree | 73edf9687c023f89ca51c59feccf20765ebf3e14 | |
parent | 5d03056bf1432fd57359f05134de47b69bdbd37c (diff) | |
download | ptxdist-2014.09.0.tar.gz ptxdist-2014.09.0.tar.xz |
ptxd_make_xpkg_pkg: handle SIGPIPE correctlyptxdist-2014.09.0
grep -q exits as soon as the first expression is found. This leads to a
SIGPIPE to the objcopy process. SIGPIPE results in an exit code of 141.
So ptxd_install_file_extract_debug must handle the 141 return value as
,,didn't work'' because the grep found the expected error string.
Signed-off-by: Tim Niemeyer <tim.niemeyer@corscience.de>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | scripts/lib/ptxd_make_xpkg_pkg.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh index c80adea10..86196a2e3 100644 --- a/scripts/lib/ptxd_make_xpkg_pkg.sh +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh @@ -230,7 +230,7 @@ ptxd_install_file_extract_debug() { "${CROSS_OBJCOPY}" ${ptxd_install_file_objcopy_args} "${dir}${dst}" "${dbg}" |& grep -q "\(unrecognized option\|unable to initialize commpress status\)" local -a status=( "${PIPESTATUS[@]}" ) - if [ ${status[0]} -eq 1 ]; then + if [ ${status[0]} -ne 0 ]; then if [ ${status[1]} -eq 0 ]; then ptxd_install_file_objcopy_args="--only-keep-debug" "${CROSS_OBJCOPY}" ${ptxd_install_file_objcopy_args} "${dir}${dst}" "${dbg}" |