tar considers tar.gz as tar and fails

Bug #1038024 reported by Nokir
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tar (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I tried to open http://pkgs.fedoraproject.org/repo/pkgs/xscreensaver/xscreensaver-5.19.tar.gz/db001e7d17b68fef22f66beb68beb114/xscreensaver-5.19.tar.gz with
$ tar -tf xscreensaver-5.19.tar.gz
I get the following:

tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors

But this works:

$ gzip -d xscreensaver-5.19.tar.gz
$ tar -tf xscreensaver-5.19.tar

This works too:

$ tar -tf xscreensaver-5.18.tar.gz
with the file from http://pkgs.fedoraproject.org/repo/pkgs/xscreensaver/xscreensaver-5.18.tar.gz/92eccee4bf6cd8bc6c0de98c1b3107fa/xscreensaver-5.18.tar.gz

So tar can open tar.gz files and xscreensaver-5.19.tar.gz is readable, but tar can't open this file.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: tar 1.26-4ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-27.43-generic 3.2.21
Uname: Linux 3.2.0-27-generic x86_64
ApportVersion: 2.0.1-0ubuntu12
Architecture: amd64
Date: Fri Aug 17 12:21:13 2012
InstallationMedia: Xubuntu 11.04 "Natty Narwhal" - Release amd64 (20110426.1)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: tar
UpgradeStatus: Upgraded to precise on 2012-05-02 (107 days ago)

Revision history for this message
Nokir (nokir) wrote :
Revision history for this message
Julian Taylor (jtaylor) wrote :

this is a "feature" of tar, you have to tell it the compression type the tar has or tell it to figure it out itself.
tar xfz for gzip (j bzip2, J xz)
tar xfa for autodetection

Changed in tar (Ubuntu):
status: New → Invalid
Revision history for this message
Nokir (nokir) wrote :

I tried this two commands:
$ tar -tzf xscreensaver-5.19.tar.gz
$ tar -taf xscreensaver-5.19.tar.gz

The same error occurs.
Everything is fine with xscreensaver-5.18.tar.gz. Apparently tar fails to recognize that xscreensaver-5.19.tar.gz is gz compressed, even when I give the -z option. For xscreensaver-5.18.tar.gz, the compression is detected without a special command line option.

Changed in tar (Ubuntu):
status: Invalid → New
Nokir (nokir)
description: updated
Revision history for this message
Julian Taylor (jtaylor) wrote :

works fine with the linked on my 12.04 amd64
probably your download is corrupted.

Changed in tar (Ubuntu):
status: New → Incomplete
Revision history for this message
Nokir (nokir) wrote :

I am very sorry. This is the file that causes the problem: http://www.jwz.org/xscreensaver/xscreensaver-5.19.tar.gz

Revision history for this message
Julian Taylor (jtaylor) wrote :

indeed that file unzips with gzip but not with tar xfz

Changed in tar (Ubuntu):
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.