Comment 1 for bug 1510719

Revision history for this message
Ryan Harper (raharper) wrote :

The source of the change is here, the question is what isn't tar doing the right thing then.
My understanding is that tar can skip the compression option if it's operating on a file directly (tar -tvf mytar.tgz) but when passed through a pipe, it doesnt (cat mytar.tgz | tar -tvf -).

% bzr log -n0 -r282
------------------------------------------------------------
revno: 282
committer: Scott Moser <email address hidden>
branch nick: trunk
timestamp: Fri 2015-10-09 10:48:17 -0400
message:
  extract: do not specify 'z' to tar extract

  tar will automatically do the right thing for compression
  it knows about. Removing the 'z' here makes us able to install
  a .tar.xz file too.

% bzr diff -r281..282
=== modified file 'curtin/commands/extract.py'
--- curtin/commands/extract.py 2015-10-02 18:37:42 +0000
+++ curtin/commands/extract.py 2015-10-09 14:48:17 +0000
@@ -55,7 +55,7 @@
     curtin.util.subp(args=['sh', '-cf',
                            ('wget "$1" --progress=dot:mega -O - |'
                             'tar -C "$2" ' + ' '.join(tar_xattr_opts()) +
- ' ' + '-Sxpzf - --numeric-owner'),
+ ' ' + '-Sxpf - --numeric-owner'),
                            '--', source, target])