bug-gzip
[Top][All Lists]
Advanced

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

Re: Bug in gzip 1.4?


From: Paul Eggert
Subject: Re: Bug in gzip 1.4?
Date: Wed, 01 Dec 2010 11:05:24 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10

On 12/01/10 04:41, Wieman, Karl wrote:

> Under gzip 1.4, if you specify --force, gzip will attempt to
> compress 'FILE.gz' and create 'FILE.gz.gz'.  Under previous
> versions, even with '-f' specified, it would exit with "gzip:
> FILE.gz already has .gz suffix -- unchanged" and leave FILE.gz
> unchanged.

This change predates 1.4: it was in gzip 1.3.13 (dated 2009-09-30).
It was installed due to an earlier bug report; see
<http://www.mail-archive.com/address@hidden/msg00091.html>.

> We use -f to allow gzip to overwrite existing .gz files without prompting.

Sorry, I don't get the connection.  -f still does that:

   $ echo foo >foo
   $ gzip foo
   $ echo blahblah >foo
   $ ls -l foo*
   -rw-r--r-- 1 eggert eggert  9 Dec  1 10:55 foo
   -rw-r--r-- 1 eggert eggert 28 Dec  1 10:55 foo.gz
   $ gzip -f foo
   $ ls -l foo*
   -rw-r--r-- 1 eggert eggert 31 Dec  1 10:55 foo.gz

Can you please give a useful scenario that used to work under gzip
1.3.12 but fails in later gzips?

Hmm, I see that NEWS incorrectly claimed that this change was in
gzip 1.3.12.  I fixed this as follows:

>From 8290fee360b58995c6b58404817afcc032c3473e Mon Sep 17 00:00:00 2001
From: Paul Eggert <address@hidden>
Date: Wed, 1 Dec 2010 11:02:04 -0800
Subject: [PATCH] * NEWS: The "gzip -f foo.gz" change occurred in 1.3.13, not 
1.3.12

---
 NEWS |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 0866500..18baee4 100644
--- a/NEWS
+++ b/NEWS
@@ -52,6 +52,8 @@ GNU gzip NEWS                                    -*- outline 
-*-
 
 * Noteworthy changes in release 1.3.13 (2009-09-30) [stable]
 
+** 'gzip -f foo.gz' now creates a file foo.gz.gz instead of complaining.
+
 ** Bug fixes
 
   gzip -d no longer fails with "-" as 2nd or subsequent argument
@@ -65,8 +67,6 @@ Major changes in Gzip 1.3.12 (2007-04-13)
 
 * znew now uses $TMPDIR (default /tmp) instead of always using /tmp.
 
-* 'gzip -f foo.gz' now creates a file foo.gz.gz instead of complaining.
-
 * It is now documented that gzip ignores case when examining file name
   extensions; for example, 'gzip test.Gz' (without -f) fails because
   the file name ends in '.Gz'.
-- 
1.7.2





reply via email to

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