aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/build_defs/pkg
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2015-11-18 03:35:40 +0000
committerGravatar Lukacs Berki <lberki@google.com>2015-11-18 15:31:54 +0000
commit07475c7b3812d6194602213a69e6e9f70643b32a (patch)
tree4e577b914b8f13cd5b68266797c9ffebaa521563 /tools/build_defs/pkg
parent9190c8407cb3de13f33f85a856ef31d23b759fb7 (diff)
*** Reason for rollback *** broke Speckle and Dataflow *** Original change description *** [docker] Print a clearer message when xzcat cannot be found and is needed Also use the default shell env for docker deb files. Fixes #611. -- MOS_MIGRATED_REVID=108105646
Diffstat (limited to 'tools/build_defs/pkg')
-rw-r--r--tools/build_defs/pkg/archive.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/tools/build_defs/pkg/archive.py b/tools/build_defs/pkg/archive.py
index 10d5298ae4..6660663c41 100644
--- a/tools/build_defs/pkg/archive.py
+++ b/tools/build_defs/pkg/archive.py
@@ -15,7 +15,6 @@
import os
from StringIO import StringIO
-import subprocess
import tarfile
@@ -291,9 +290,6 @@ class TarFileWriter(object):
the file is to be added to the final tar and false otherwise.
root: place all non-absolute content under given root direcory, if not
None.
-
- Raises:
- TarFileWriter.Error: if an error happens when uncompressing the tar file.
"""
compression = os.path.splitext(tar)[-1][1:]
if compression == 'tgz':
@@ -312,14 +308,7 @@ class TarFileWriter(object):
# large files.
# TODO(dmarting): once our py3 support gets better, compile this tools
# with py3 for proper lzma support.
- if subprocess.call('which xzcat', shell=True):
- raise self.Error('Cannot handle .xz and .lzma compression: '
- 'xzcat not found.')
- p = subprocess.Popen('cat %s | xzcat' % tar,
- shell=True,
- stdout=subprocess.PIPE)
- p.wait()
- f = StringIO(p.stdout.read())
+ f = StringIO(os.popen('cat %s | xzcat' % tar).read())
intar = tarfile.open(fileobj=f, mode='r:')
else:
intar = tarfile.open(name=tar, mode='r:' + compression)