bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] [PATCH] tar: do not fail hardly when compressor just warns


From: Pavel Raiskup
Subject: Re: [Bug-tar] [PATCH] tar: do not fail hardly when compressor just warns
Date: Mon, 29 Apr 2013 07:58:37 +0200
User-agent: KMail/4.10.2 (Linux/3.8.8-202.fc18.x86_64; KDE/4.10.2; x86_64; ; )

Hi Antonio, thanks for comments,

> Pavel Raiskup wrote:
> > Use '--compres-program'-like API by the -Z, but also by -z, -J,
> > --lzop and --lzma options.
>
> I oppose this, except perhaps for -Z.
>
> AFAIK, tar files are compressible enough that none of those compressors
> has been reported as returning 2

Exit value 2 is a general warning exit status among compressors, not
necessary to be relevant to usable compress ratio.  But yes, tar archives
should be compressible enough due to its headers - but it was a real bug
which can disturb random real user .. and what could be worse, if it
breaks randomly scripts.

> if important programs like GNU tar begin accepting an exit status of '2'
> as success for those compressors, it will prevent them from switching to
> the correct and sane API

This is not so truth, nobody prevents anyone from switching — I see this
patch more like just a configuration of GNU tar.  One line switch is
needed to honor different API.  This patch is intended just to make tar
work *now* .. don't wait forever.

And even if some standard compressor change its API (I see this as an
highly unlikely), it is very easily configurable on target distribution
tar (distro maintainers can know, which API its distributed compressor
uses) - not possible now, thats why I am trying to solve this.

> It seems that pigz does not use the compress API.

Thanks for this info!  Tried to find it in manual page and wasn't
successful.

> Moreover, I think an even more complex patch would be needed for this to
> work also when tar automaticaly chooses the compressor by archive name
> extension.

Thanks!  I forgot about this; it should be fixed also.  I would be glad to
do it if this idea is still not destroyed.  Paul, should I try to fix this
or skip?

> Would it not be easier to make tar pass the '-f' flag to compress (and
> perhaps the compress-like compressors)?

Thanks, I missed this also :) this is not a bug and it would be easier..

  | if (bytes_out >= bytes_in && !(force))
  |   exit_code = 2;

I'm just not sure here if this does not silence other errors, is this
safe?

Pavel




reply via email to

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