svn commit: r316980 - head/contrib/zstd/programs

Allan Jude allanjude at freebsd.org
Thu Nov 16 16:04:29 UTC 2017


On 2017-11-16 04:04, Baptiste Daroussin wrote:
> On Wed, Nov 15, 2017 at 07:38:13PM -0800, Conrad Meyer wrote:
>> Please revert this change.
>>
>> First, it introduces the POLA-violating behavior that zstdcat deletes
>> its source files.  This is not how zcat/bzcat behaves.
> 
> This is not a POLA-violating behavior, this is a bug! that I introduced.
>>
>> Second, it introduces a needless behavioral difference between FreeBSD
>> zstd and the rest of the world's zstd.  The zstd documentation we ship
>> continues to claim that zstd preserves source files by default, yet
>> this change makes that documentation exactly backwards.  While we can
>> change FreeBSD's documentation to accommodate the change, we can't
>> change Google results.
>>
> 
> The difference has been made so that zstd follow by default the same behaviour
> has gzip/bzip2/xz so it can be a dropped in replacement.
> 
> The argument about the documentation is however a good one. Let me do first some
> tests to ensure restoring the initial behaviour does not break existing usage in
> base
> 
> Best regards,
> Bapt
> 

I think in this case, it is safer to surprise the user by NOT deleting a
file, than to surprise a user by DELETING a file.

If you really want to modify the behaviour (I suggest we don't, and
stick closer to upstream zstd), then you'll want to set the 'delete'
flag for the specific invocation cases inside zstdcli.c, rather than
modifying the default as was done in this commit.

I think we can deal with changing the default verbosity level.

I think if we want to compromise, we make 2 additional hard links, zzip
and zunzip that maintain the gzip like behaviour, since those will not
conflict with the documentation that exists in the rest of the world for
zstd(1)

-- 
Allan Jude

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20171116/86f477a9/attachment.sig>


More information about the svn-src-all mailing list