summaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-03-14 10:00:46 +0000
committerZac Medico <zmedico@gentoo.org>2010-03-14 10:00:46 +0000
commitbe8f19425b821f1863ead2566d32240c88a86541 (patch)
treec1ef3cf409feba16863113c5eb16ed7b421ee169 /pym
parentUpdate SIGPIPE comments to refer to "[Errno 32] Broken pipe" exceptions since (diff)
downloadportage-idfetch-be8f19425b821f1863ead2566d32240c88a86541.tar.gz
portage-idfetch-be8f19425b821f1863ead2566d32240c88a86541.tar.bz2
portage-idfetch-be8f19425b821f1863ead2566d32240c88a86541.zip
Revert tar error handling changes from bug #309001 since we can't necessarily
trust tar exist status alone (reverts r15820 and r15821). svn path=/main/trunk/; revision=15827
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/BinpkgExtractorAsync.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/_emerge/BinpkgExtractorAsync.py b/pym/_emerge/BinpkgExtractorAsync.py
index 0c6e8919..d9416643 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))]