diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-23 17:57:48 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-23 17:57:48 -0700 |
commit | 0ab6f83070c9a32a24454053319c99559c2654ca (patch) | |
tree | 02691a5ce6da1bfeb67761571f46c47e2b4161a1 /bin/ebuild.sh | |
parent | 3359e0116b4e592b28ac0f24fed6a1e2eabe6bf6 (diff) | |
download | portage-0ab6f83070c9a32a24454053319c99559c2654ca.tar.gz portage-0ab6f83070c9a32a24454053319c99559c2654ca.tar.bz2 portage-0ab6f83070c9a32a24454053319c99559c2654ca.zip |
Handle SIGPIPE when unpack() extracts tar files through a pipe (bug #309001).
When checking ${PIPESTATUS[@]} for extraction of tar files in unpack(),
use a new assert_sigpipe_ok() function which behaves the same as the
existing assert() function except that it tolerates pipe writers being
killed by SIGPIPE.
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-x | bin/ebuild.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 84a83fe40..b2ac5b419 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -348,7 +348,7 @@ unpack() { _unpack_tar() { if [ "${y}" == "tar" ]; then $1 -dc "$srcdir$x" | tar xof - - assert "$myfail" + assert_sigpipe_ok "$myfail" else $1 -dc "${srcdir}${x}" > ${x%.*} || die "$myfail" fi @@ -364,7 +364,7 @@ unpack() { ;; tbz|tbz2) bzip2 -dc "$srcdir$x" | tar xof - - assert "$myfail" + assert_sigpipe_ok "$myfail" ;; ZIP|zip|jar) unzip -qo "${srcdir}${x}" || die "$myfail" |