[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] Do not fail when 'compress' is unable to provide sufficien
From: |
Antonio Diaz Diaz |
Subject: |
Re: [Bug-tar] Do not fail when 'compress' is unable to provide sufficient compress ratio |
Date: |
Tue, 30 Apr 2013 17:09:36 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905 |
Tim Kientzle wrote:
If you look at the source code for "compress", you find
that the return code 2 is *only* used when compressing
files in-place.
The source code for what compress? Mine is this (and it does return 2
when compressing stdin to stdout):
$ compress -V
Based on compress.c,v 4.0 85/07/30 12:50:00 joe Release
Options: BITS = 16
It does not apply when compressing stdin to stdout.
$ echo foo | compress > /dev/null ; echo $?
2
I believe GNU tar forks compressors to compress from
stdin to stdout, so this should never occur.
Sadly this has already occurred. It is the cause of this long thread.
And the bad news is that, unlike when compressing files in-place,
passing -f to compress does not make it return 0:
$ echo foo | compress -f > /dev/null ; echo $?
2
Given how inconsistent the documentation and the implementations of
compress are, that it is obsolete, and that the compress format was not
designed to allow integrity checks, I would like to make a proposal for
the maintainers of tar to consider. What about removing *compression*
support for compress from tar?
I mean, is anybody still *creating* tar.Z files?
And if there is somebody doing this, can't they use compress directly?:
$ echo foo > foo
$ tar -c foo | compress > foo.tar.Z ; echo $?
0
Best regards,
Antonio.
- Re: [Bug-tar] [PATCH] Do not fail when 'compress' is unable to provide sufficient compress ratio, (continued)
- Re: [Bug-tar] [PATCH] Do not fail when 'compress' is unable to provide sufficient compress ratio, Pavel Raiskup, 2013/04/26
- Re: [Bug-tar] [PATCH] Do not fail when 'compress' is unable to provide sufficient compress ratio, Paul Eggert, 2013/04/26
- Re: [Bug-tar] [PATCH] Do not fail when 'compress' is unable to provide sufficient compress ratio, Pavel Raiskup, 2013/04/26
- Re: [Bug-tar] [PATCH] Do not fail when 'compress' is unable to provide sufficient compress ratio, Antonio Diaz Diaz, 2013/04/26
- Re: [Bug-tar] [PATCH] Do not fail when 'compress' is unable to provide sufficient compress ratio, Paul Eggert, 2013/04/26
- Re: [Bug-tar] [PATCH] Do not fail when 'compress' is unable to provide sufficient compress ratio, Antonio Diaz Diaz, 2013/04/28
- Re: [Bug-tar] [PATCH] Do not fail when 'compress' is unable to provide sufficient compress ratio, Pavel Raiskup, 2013/04/29
- Re: [Bug-tar] [PATCH] Do not fail when 'compress' is unable to provide sufficient compress ratio, Paul Eggert, 2013/04/29
- Re: [Bug-tar] Do not fail when 'compress' is unable to provide sufficient compress ratio, Antonio Diaz Diaz, 2013/04/29
- Re: [Bug-tar] Do not fail when 'compress' is unable to provide sufficient compress ratio, Tim Kientzle, 2013/04/30
- Re: [Bug-tar] Do not fail when 'compress' is unable to provide sufficient compress ratio,
Antonio Diaz Diaz <=
- Re: [Bug-tar] Do not fail when 'compress' is unable to provide sufficient compress ratio, Stefano Lattarini, 2013/04/30
- Re: [Bug-tar] Do not fail when 'compress' is unable to provide sufficient compress ratio, Antonio Diaz Diaz, 2013/04/30
- Re: [Bug-tar] [PATCH] Do not fail when 'compress' is unable to provide sufficient compress ratio, Paul Eggert, 2013/04/26
- [Bug-tar] [PATCH] tar: do not fail hardly when compressor just warns, Pavel Raiskup, 2013/04/27
- Re: [Bug-tar] [PATCH] tar: do not fail hardly when compressor just warns, Antonio Diaz Diaz, 2013/04/28
- Re: [Bug-tar] [PATCH] tar: do not fail hardly when compressor just warns, Pavel Raiskup, 2013/04/29
- Re: [Bug-tar] tar: do not fail hardly when compressor just warns, Antonio Diaz Diaz, 2013/04/29