]> Dogcows Code - chaz/tar/commitdiff
* src/buffer.c (short_read): Remove !read_full_records condition,
authorSergey Poznyakoff <gray@gnu.org.ua>
Wed, 22 Oct 2008 20:55:35 +0000 (20:55 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Wed, 22 Oct 2008 20:55:35 +0000 (20:55 +0000)
which was always false on a first record and thus disabled record
size autodetection.  Thanks Ed Leaver for the patch.
(_gnu_flush_read): Handle blocking_factor == 1.
* tests/sparsemv.at: Reflect changes to buffer.c.
* tests/sparsemvp.at: Likewise.
* tests/volsize.at: Likewise.
* NEWS: Update.
* THANKS: Add Ed Leaver.

ChangeLog
NEWS
THANKS
src/buffer.c
tests/sparsemv.at
tests/sparsemvp.at
tests/volsize.at

index 4e74e8c0967a77b95f91c6894d2a0cad9324b6c0..2d54b2a58df03db6d7b12400e18e50a680e13c9d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2008-10-19  Sergey Poznyakoff  <gray@gnu.org.ua>
+
+       * THANKS: Add Ed Leaver.
+       * src/buffer.c (short_read): Remove !read_full_records condition,
+       which was always false on a first record and thus disabled record
+       size autodetection.  Thanks Ed Leaver for the patch.
+       (_gnu_flush_read): Handle blocking_factor == 1.
+       * tests/sparsemv.at: Reflect changes to buffer.c.
+       * tests/sparsemvp.at: Likewise.
+       * tests/volsize.at: Likewise.
+       * NEWS: Update.
+       
 2008-10-16  Sergey Poznyakoff  <gray@gnu.org.ua>
 
        * src/common.h (transform_symlinks_option): New global.
diff --git a/NEWS b/NEWS
index a55eb34088d59ba9d60ce9883e2fd17d03127b42..b87d017e597541d846bdb9197d9a483214e0e810 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU tar NEWS - User visible changes. 2008-10-16
+GNU tar NEWS - User visible changes. 2008-10-22
 Please send GNU tar bug reports to <bug-tar@gnu.org>
 
 \f
@@ -42,6 +42,10 @@ prior --transform-symlink.
 
 ** The --null option disabled handling of tar options in list files.  This
 is fixed.
+** Fixed record size autodetection.  If the detected record size differs from
+the expected value (either default, or set on the command line), tar
+always prints a warning if verbosity level is set to 1 or greater,
+i.e. if either -t or -v option is given.
 
 \f
 
diff --git a/THANKS b/THANKS
index 986b1af7f53f44cda7583453455f42e9c9749a5c..dbb64d25f64f9cadcf372bb292915693979c897f 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -147,6 +147,7 @@ Drew Sullivan               drew@sni.ca
 Drew Trieger           trieger@woodstock.abbott.com
 Dunstan Vavasour       dev@cegelecproj.co.uk
 Ed Childs              echilds@bgs.com
+Ed Leaver              ewleaver@comcast.net
 Edgar Taube            et@immd8.informatik.uni-erlangen.de
 Eduardo Kortright      eduardo@cs.ua.edu
 Eduardo V. de Rivas    eddie@asterion.com
index 79bb7d6f4d45a6e1b724cf1fa5382838ea84203f..59d4e4f0c16c4c793f1d97e6fb3c67923fbd1150 100644 (file)
@@ -687,7 +687,7 @@ short_read (size_t status)
   left = record_size - status;
 
   if (left && left % BLOCKSIZE == 0
-      && !read_full_records && verbose_option > 1
+      && verbose_option
       && record_start_block == 0 && status != 0)
     {
       unsigned long rsize = status / BLOCKSIZE;
@@ -1567,6 +1567,9 @@ _gnu_flush_read (void)
         {
           while (!try_new_volume ())
             ;
+         if (current_block == record_end)
+           /* Necessary for blocking_factor == 1 */
+           flush_archive();
           return;
         }
       else if (status == SAFE_READ_ERROR)
index a0d375e87d9364bef6783553175dcb0d510c432b..81da61309d15fe3c9f1b4dd71e3819d413d25094 100644 (file)
@@ -1,7 +1,7 @@
 # Process this file with autom4te to create testsuite. -*- Autotest -*-
 
 # Test suite for GNU tar.
-# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -35,18 +35,18 @@ echo "Pass 1: Split between data blocks"
 echo "Create archive"
 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
 echo "Test archive"
-tar -t -M -f arc.1 -f arc.2 
+tar --record-size=512 -t -M -f arc.1 -f arc.2 
 echo "Compare archive"
-tar -d -M -f arc.1 -f arc.2
+tar --record-size=512 -d -M -f arc.1 -f arc.2
 
 echo "Pass 2: Split within a data block"
 genfile --sparse --file sparsefile 0 ABCDEFGHIJ 1M ABCDEFGHI || AT_SKIP_TEST
 echo "Create archive"
 tar --sparse -c --record-size=512 -M -L6 -f arc.1 -f arc.2 sparsefile || exit 1
 echo "Test archive"
-tar -t -M -f arc.1 -f arc.2 
+tar --record-size=512 -t -M -f arc.1 -f arc.2 
 echo "Compare archive"
-tar -d -M -f arc.1 -f arc.2
+tar --record-size=512 -d -M -f arc.1 -f arc.2
 ],
 [0],
 [Pass 1: Split between data blocks
index 26748135c0646297d3efb98bdf9a0926c1a21031..2edd823320002bfb9b907a8f4cd7cb871ecf8edc 100644 (file)
@@ -1,7 +1,7 @@
 # Process this file with autom4te to create testsuite. -*- Autotest -*-
 
 # Test suite for GNU tar.
-# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -56,5 +56,7 @@ Test archive
 sparsefile
 Compare archive
 ],
-[],[],[],[pax])])
+[tar: Record size = 12 blocks
+tar: Record size = 12 blocks
+],[],[],[pax])])
 
index 3408f816eb9e80fb217a3d4e5b2edb24e7145c71..b8624a047213e8560f33b93507e3b7238a2ecfc9 100644 (file)
@@ -1,7 +1,7 @@
 # Process this file with autom4te to create testsuite. -*- Autotest -*-
 
 # Test suite for GNU tar.
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -51,6 +51,9 @@ V--------- 0/0            1536 2006-05-08 22:07 abc/not-a-file.gif--Volume Heade
 Extracted directory
 abc
 abc/CCC
+],
+[tar: Record size = 5 blocks
+tar: Record size = 5 blocks
 ])
 
 AT_CLEANUP
This page took 0.031597 seconds and 4 git commands to generate.