bug-tar
[Top][All Lists]
Advanced

[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:56:23 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.11) Gecko/20050905

Paul Eggert wrote:
If you look at the gzip source code you'll
find a number of circumstances that will
cause it to exit with status 2, as a warning.

It seems these warnings have been causing trouble since long ago:

http://www.gnu.org/software/tar/manual/html_node/Blocking-Factor.html#SEC157

"gzip will complain about trailing garbage if asked to uncompress a compressed archive on tape, there is an option to turn the message off, but it breaks the regularity of simply having to use 'prog -d' for decompression. It would be nice if gzip was silently ignoring any number of trailing zeros. I'll ask Jean-loup Gailly, by sending a copy of this message to him."

"'gzip -d -q' will be silent about the trailing zeros indeed, but will still return an exit status of 2 which tar reports in turn. tar might ignore the exit status returned, but I hate doing that, as it weakens the protection tar offers users against other possible problems at decompression time. If gzip was silently skipping trailing zeros and also avoiding setting the exit status in this innocuous case, that would solve this situation."


This API isn't likely to change any time soon,
I'm afraid, as gzip is fairly frozen.

Now that tar and gzip share at least one maintainer is a good moment to fix the warnings that can be fixed and document the rest. Currently the exit status of gzip is not documented in the manual (only briefly in the man page).


Best regards,
Antonio.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]