summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2008-06-26 06:32:25 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2008-06-26 06:32:25 +0000
commit985637ab5a7448cf89e59ac433229a4fef2d265d (patch)
tree2997ab834e20f3b74d016d84b98e6879b67c59e9
parent1024343a2bda7e9f5d522e28f329ae94862b3228 (diff)
downloadtar-985637ab5a7448cf89e59ac433229a4fef2d265d.tar.gz
Bugfixes.
* 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.
-rw-r--r--ChangeLog14
-rw-r--r--NEWS4
-rw-r--r--lib/.cvsignore5
-rw-r--r--src/buffer.c18
-rw-r--r--tests/delete05.at2
-rw-r--r--tests/gzip.at2
-rw-r--r--tests/ignfail.at4
-rw-r--r--tests/longv7.at2
-rw-r--r--tests/lustar01.at2
-rw-r--r--tests/lustar02.at2
-rw-r--r--tests/shortfile.at2
11 files changed, 48 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index d7f16657..8948d43d 100644
--- 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 4fe021e4..a9036d5e 100644
--- 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.
diff --git a/lib/.cvsignore b/lib/.cvsignore
index 0290a6e6..eb463340 100644
--- a/lib/.cvsignore
+++ b/lib/.cvsignore
@@ -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
diff --git a/src/buffer.c b/src/buffer.c
index 8f8b43f2..4286f67c 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -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 ();
diff --git a/tests/delete05.at b/tests/delete05.at
index d4880b85..66c6367a 100644
--- a/tests/delete05.at
+++ b/tests/delete05.at
@@ -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
diff --git a/tests/gzip.at b/tests/gzip.at
index f3a4a868..eb430305 100644
--- a/tests/gzip.at
+++ b/tests/gzip.at
@@ -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
],
[],[])
diff --git a/tests/ignfail.at b/tests/ignfail.at
index f1d9d335..03f90450 100644
--- a/tests/ignfail.at
+++ b/tests/ignfail.at
@@ -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
])
diff --git a/tests/longv7.at b/tests/longv7.at
index e8eae5a3..9f037444 100644
--- a/tests/longv7.at
+++ b/tests/longv7.at
@@ -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])
diff --git a/tests/lustar01.at b/tests/lustar01.at
index f50a9ab1..580aa85e 100644
--- a/tests/lustar01.at
+++ b/tests/lustar01.at
@@ -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
diff --git a/tests/lustar02.at b/tests/lustar02.at
index 7f683d88..83e0b53d 100644
--- a/tests/lustar02.at
+++ b/tests/lustar02.at
@@ -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
diff --git a/tests/shortfile.at b/tests/shortfile.at
index dbebc509..1c0b4dc9 100644
--- a/tests/shortfile.at
+++ b/tests/shortfile.at
@@ -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])