Bug #309001 - Only trust tar exit status (ignore decompressor exit status)
authorZac Medico <zmedico@gentoo.org>
Thu, 11 Mar 2010 23:27:54 +0000 (23:27 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 11 Mar 2010 23:27:54 +0000 (23:27 -0000)
when unpacking tar files.

svn path=/main/trunk/; revision=15820

bin/ebuild.sh

index 60c8f5e2297ecf8bc1ec54f1ad05d919f0c88563..d3470498d4d00411fb19c23d25749819a6fb396b 100755 (executable)
@@ -356,8 +356,7 @@ unpack() {
 
                _unpack_tar() {
                        if [ "${y}" == "tar" ]; then
-                               $1 -dc "$srcdir$x" | tar xof -
-                               assert "$myfail"
+                               $1 -dc "$srcdir$x" | tar xof - || die "$myfail"
                        else
                                $1 -dc "${srcdir}${x}" > ${x%.*} || die "$myfail"
                        fi
@@ -372,8 +371,7 @@ unpack() {
                                tar xozf "$srcdir$x" || die "$myfail"
                                ;;
                        tbz|tbz2)
-                               bzip2 -dc "$srcdir$x" | tar xof -
-                               assert "$myfail"
+                               bzip2 -dc "$srcdir$x" | tar xof - || die "$myfail"
                                ;;
                        ZIP|zip|jar)
                                unzip -qo "${srcdir}${x}" || die "$myfail"