FreeBSD tar errors on valid empty tar.gz

Chuck Swiger cswiger at mac.com
Thu Jan 10 16:47:16 PST 2008


On Jan 10, 2008, at 4:41 PM, Kris Kennaway wrote:
>> Not that I'm aware of. gtar works but libarchive tar fails on
>> the file it created.
>
> Yes, in 6.2.  What about the report that it works in 6.3?


Indeed.  Trying to create a tarball using a non-existent list of files  
returns an error and generates a 0-byte tgz; as previously shown, BSD  
tar in 6.3 treats that as an empty archive, which seems reasonable,  
whereas gtar feeds it to gzip which generates an error:

20% tar cvzf test.tar.gz --files-from empty
tar: Couldn't open empty: No such file or directory
21% ls -l test.tar.gz
-rw-r--r--  1 chuck  chuck  0 Jan 10 19:42 test.tar.gz
22% tar tvzf test.tar.gz
23% gtar tvzf test.tar.gz
gzip: (stdin): unexpected end of file
gtar: Child returned status 1
gtar: Error exit delayed from previous errors

Regards,
-- 
-Chuck



More information about the freebsd-stable mailing list