]> Dogcows Code - chaz/tar/commitdiff
Bugfixes.
authorSergey Poznyakoff <gray@gnu.org.ua>
Thu, 26 Jun 2008 06:32:25 +0000 (06:32 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Thu, 26 Jun 2008 06:32:25 +0000 (06:32 +0000)
* src/buffer.c (try_new_volume): Print more information with error
diagnostics.
(_gnu_flush_write): Improve error checking.  Adjust
real_s_sizeleft before calling new_volume to avoid creating
malformed multivolume headers.
* tests/delete05.at, tests/gzip.at, tests/ignfail.at,
tests/longv7.at, tests/lustar01.at, tests/lustar02.at,
tests/shortfile.at: Update to match new diagnostic wording
(see 2008-05-06).

* NEWS: Update.

ChangeLog
NEWS
lib/.cvsignore
src/buffer.c
tests/delete05.at
tests/gzip.at
tests/ignfail.at
tests/longv7.at
tests/lustar01.at
tests/lustar02.at
tests/shortfile.at

index d7f1665759d350879dd74c15a30fb366d64a9272..8948d43d4fc8d9a55fd4e75e4ee2fe4df0d5942d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2008-06-26  Sergey Poznyakoff  <gray@gnu.org.ua>
+
+       * src/buffer.c (try_new_volume): Print more information with error
+       diagnostics.
+       (_gnu_flush_write): Improve error checking.  Adjust
+       real_s_sizeleft before calling new_volume to avoid creating
+       malformed multivolume headers.
+       * tests/delete05.at, tests/gzip.at, tests/ignfail.at,
+       tests/longv7.at, tests/lustar01.at, tests/lustar02.at,
+       tests/shortfile.at: Update to match new diagnostic wording
+       (see 2008-05-06).
+       
+       * NEWS: Update.
+
 2008-06-14  Sergey Poznyakoff  <gray@gnu.org.ua>
 
        * doc/tar.texi (exclude): Document support for new VCS.
diff --git a/NEWS b/NEWS
index 4fe021e4f4f637f2a1eb9691702d8b6345386add..a9036d5e8e17b8df25d452860184fcb6bb127430 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -59,6 +59,10 @@ Names".
 The value of the blocking factor is made available to info and
 checkpoint scripts via environment variable TAR_BLOCKING_FACTOR.
 
+* Incremental archives
+
+Improved (sped up) extracting from incremental archives.
+
 * Bugfixes.
 ** Fix bug introduced in version 1.19: tar refused to update non-existing
 archives.
index 0290a6e677fad753289b807eededeff6666e7ebc..eb463340c46b899db8aea6afbf7eed54154a4388 100644 (file)
@@ -149,6 +149,8 @@ quote.c
 quote.h
 quotearg.c
 quotearg.h
+rawmemchr.c
+rawmemchr.valgrind
 readlink.c
 realloc.c
 ref-add.sed
@@ -181,10 +183,12 @@ sleep.c
 snprintf.c
 stat-macros.h
 stat-time.h
+stdarg.in.h
 stdbool.h
 stdbool.in.h
 stdint.h
 stdint.in.h
+stdio-impl.h
 stdio.h
 stdio.in.h
 stdlib.h
@@ -192,6 +196,7 @@ stdlib.in.h
 stpcpy.c
 strcasecmp.c
 strchrnul.c
+strchrnul.valgrind
 strdup.c
 streq.h
 strerror.c
index 8f8b43f26b3aab91e5eff8807928b28428a795f5..4286f67ce09672a84aa0e9ae060c906cc91c0fee 100644 (file)
@@ -1224,7 +1224,15 @@ try_new_volume ()
 
       if (real_s_totsize - real_s_sizeleft != continued_file_offset)
        {
-         WARN ((0, 0, _("This volume is out of sequence")));
+         char totsizebuf[UINTMAX_STRSIZE_BOUND];
+         char s1buf[UINTMAX_STRSIZE_BOUND];
+         char s2buf[UINTMAX_STRSIZE_BOUND];
+
+         WARN ((0, 0, _("This volume is out of sequence (%s - %s != %s)"),
+                STRINGIFY_BIGINT (real_s_totsize, totsizebuf),
+                STRINGIFY_BIGINT (real_s_sizeleft, s1buf),
+                STRINGIFY_BIGINT (continued_file_offset, s2buf)));
+        
          return false;
        }
     }
@@ -1581,11 +1589,18 @@ _gnu_flush_write (size_t buffer_level)
       return;
     }
 
+  if (status % BLOCKSIZE)
+    {
+      ERROR ((0, 0, _("write did not end on a block boundary")));
+      archive_write_error (status);
+    }
+  
   /* In multi-volume mode. */
   /* ENXIO is for the UNIX PC.  */
   if (status < 0 && errno != ENOSPC && errno != EIO && errno != ENXIO)
     archive_write_error (status);
 
+  real_s_sizeleft -= status;
   if (!new_volume (ACCESS_WRITE))
     return;
 
@@ -1597,6 +1612,7 @@ _gnu_flush_write (size_t buffer_level)
 
   copy_ptr = record_start->buffer + status;
   copy_size = buffer_level - status;
+                  
   /* Switch to the next buffer */
   record_index = !record_index;
   init_buffer ();
index d4880b85facb1b2fa74f33392d59811294146026..66c6367ab0ec3192b1506fd5176ea4d5dd2e88b8 100644 (file)
@@ -42,7 +42,7 @@ tar tf archive
 to
 ],
 [tar: tre: Not found in archive
-tar: Error exit delayed from previous errors
+tar: Exiting with failure status due to previous errors
 ])
 
 AT_CLEANUP
index f3a4a8687e05739e11c76f4d6eab310dcc83ef9d..eb4303050abeab69d8a7be736c712e4ed546ac1d 100644 (file)
@@ -35,7 +35,7 @@ test $? = 2 || exit 1
 [
 gzip: stdin: unexpected end of file
 tar: Child returned status 1
-tar: Error exit delayed from previous errors
+tar: Exiting with failure status due to previous errors
 ],
 [],[])
 
index f1d9d3357c2e7fe834350ae3efda4eb77ea2b182..03f90450b5c2fd12c8548df9999dc1583e36373c 100644 (file)
@@ -64,12 +64,12 @@ test $status = 0
 [
 -----
 tar: file: Cannot open: Permission denied
-tar: Error exit delayed from previous errors
+tar: Exiting with failure status due to previous errors
 -----
 tar: file: Warning: Cannot open: Permission denied
 -----
 tar: directory: Cannot open: Permission denied
-tar: Error exit delayed from previous errors
+tar: Exiting with failure status due to previous errors
 -----
 tar: directory: Warning: Cannot open: Permission denied
 ])
index e8eae5a393b7f95baf3702f0a83c37e90251c906..9f03744406189adb5f80dc26e888c6ed3bbb5aaf 100644 (file)
@@ -40,7 +40,7 @@ tar tf archive
 DIR/
 ],
 [tar: DIR/FILE: file name is too long (max 99); not dumped
-tar: Error exit delayed from previous errors
+tar: Exiting with failure status due to previous errors
 ],
 [],[],[v7])
 
index f50a9ab17f3cfbce61c80d29cb24b260f7a4dd69..580aa85eb85f602d30255762f55740e0e9756a8c 100644 (file)
@@ -31,7 +31,7 @@ tar cf archive LONGNAME
 [2],
 [],
 [tar: LONGNAME: file name is too long (cannot be split); not dumped
-tar: Error exit delayed from previous errors
+tar: Exiting with failure status due to previous errors
 ],[],[],[ustar])
 
 AT_CLEANUP
index 7f683d885e67af7e82a8c89b4a649d0ff6779e70..83e0b53d16b304a1f08983d3d352f13cd07b64d2 100644 (file)
@@ -36,7 +36,7 @@ tar cf archive PREFIX_155
 [2],
 [],
 [tar: PREFIX_155/: file name is too long (cannot be split); not dumped
-tar: Error exit delayed from previous errors
+tar: Exiting with failure status due to previous errors
 ],[],[],[ustar])
 
 AT_CLEANUP
index dbebc5093c9473bdd0eaf1fd9770f6eb4d3eeed3..1c0b4dc9756a8cbf0cdf1c4f6e009bbc88964f74 100644 (file)
@@ -33,7 +33,7 @@ tar tf foo
 [2],
 [],
 [tar: This does not look like a tar archive
-tar: Error exit delayed from previous errors
+tar: Exiting with failure status due to previous errors
 ],
 [],[],[gnu])
 
This page took 0.034801 seconds and 4 git commands to generate.