From 0ab6f83070c9a32a24454053319c99559c2654ca Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 23 Aug 2010 17:57:48 -0700 Subject: 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. --- bin/ebuild.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/ebuild.sh') 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" -- cgit v1.2.3-1-g7c22