diff options
-rwxr-xr-x | bin/ebuild.sh | 6 | ||||
-rw-r--r-- | pym/_emerge/BinpkgExtractorAsync.py | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index d3470498d..60c8f5e22 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -356,7 +356,8 @@ unpack() { _unpack_tar() { if [ "${y}" == "tar" ]; then - $1 -dc "$srcdir$x" | tar xof - || die "$myfail" + $1 -dc "$srcdir$x" | tar xof - + assert "$myfail" else $1 -dc "${srcdir}${x}" > ${x%.*} || die "$myfail" fi @@ -371,7 +372,8 @@ unpack() { tar xozf "$srcdir$x" || die "$myfail" ;; tbz|tbz2) - bzip2 -dc "$srcdir$x" | tar xof - || die "$myfail" + bzip2 -dc "$srcdir$x" | tar xof - + assert "$myfail" ;; ZIP|zip|jar) unzip -qo "${srcdir}${x}" || die "$myfail" diff --git a/pym/_emerge/BinpkgExtractorAsync.py b/pym/_emerge/BinpkgExtractorAsync.py index 0c6e89196..d9416643a 100644 --- a/pym/_emerge/BinpkgExtractorAsync.py +++ b/pym/_emerge/BinpkgExtractorAsync.py @@ -14,7 +14,13 @@ class BinpkgExtractorAsync(SpawnProcess): def _start(self): self.args = [self._shell_binary, "-c", - ("bzip2 -dqc -- %s | tar -xp -C %s -f -") % \ + ("bzip2 -dqc -- %s | tar -xp -C %s -f - ; " + \ + "p=(${PIPESTATUS[@]}) ; " + \ + "if [ ${p[0]} != 0 ] ; then " + \ + "echo bzip2 failed with status ${p[0]} ; exit ${p[0]} ; fi ; " + \ + "if [ ${p[1]} != 0 ] ; then " + \ + "echo tar failed with status ${p[1]} ; exit ${p[1]} ; fi ; " + \ + "exit 0 ;") % \ (portage._shell_quote(self.pkg_path), portage._shell_quote(self.image_dir))] |