-GNU tar NEWS - User visible changes. 2009-03-05
+GNU tar NEWS - User visible changes. 2009-05-25
Please send GNU tar bug reports to <bug-tar@gnu.org>
+\f
+version 1.22.90 (Git)
+
+* Record size autodetection
+
+When listing or extracting archives, the actual record size is
+reported only if the archive is read from a device (as opposed
+to regular files and pipes).
+
\f
version 1.22 - Sergey Poznyakoff, 2009-03-05
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
-AC_INIT([GNU tar], [1.22], [bug-tar@gnu.org])
+AC_INIT([GNU tar], [1.22.90], [bug-tar@gnu.org])
AC_CONFIG_SRCDIR([src/tar.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
update.c\
utf8.c
-INCLUDES = -I$(top_srcdir)/gnu -I../ -I../gnu -I$(top_srcdir)/lib
+INCLUDES = -I$(top_srcdir)/gnu -I../ -I../gnu -I$(top_srcdir)/lib -I../lib
LDADD = ../lib/libtar.a ../gnu/libgnu.a $(LIBINTL) $(LIBICONV)
return;
}
+static bool
+archive_is_dev ()
+{
+ struct stat st;
+
+ if (fstat (archive, &st))
+ {
+ stat_diag (*archive_name_cursor);
+ return false;
+ }
+ return S_ISBLK (st.st_mode) || S_ISCHR (st.st_mode);
+}
+
static void
short_read (size_t status)
{
if (left && left % BLOCKSIZE == 0
&& verbose_option
- && record_start_block == 0 && status != 0)
+ && record_start_block == 0 && status != 0
+ && archive_is_dev ())
{
unsigned long rsize = status / BLOCKSIZE;
WARN ((0, 0,
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
-# Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2006, 2007, 2008,
+# 2009 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
AT_KEYWORDS([pipe])
-AT_TAR_WITH_HOOK([TAR_IGNREC_HOOK],
-[AT_TAR_CHECK([
+AT_TAR_CHECK([
AT_SORT_PREREQ
mkdir directory
genfile --length 10240 --pattern zeros --file directory/file1
genfile --length 13 --file directory/file2
-tar cf archive directory|sort
+tar cf archive directory
mv directory orig
-cat archive | tar xfv - | sort
+cat archive | tar xfv - | sort
echo "separator"
cmp orig/file1 directory/file1
echo "separator"
directory/file2
separator
separator
-],
-[stderr])])
+])
AT_CLEANUP
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
-# Copyright (C) 2005, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2007, 2008, 2009 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
AT_SETUP([short records])
AT_KEYWORDS([shortrec])
-AT_TAR_WITH_HOOK([TAR_IGNREC_HOOK],
-[AT_TAR_CHECK([
+AT_TAR_CHECK([
mkdir directory
(cd directory && touch a b c d e f g h i j k l m n o p q r)
-tar -c -b 1 -f - directory | tar -t -f -
+tar -c -b 1 -f - directory | tar -t -f - > /dev/null
tar -c -b 1 -f archive directory
-tar -t -f archive
-tar -t -f - < archive
+tar -t -f archive > /dev/null
+tar -t -f - < archive > /dev/null
rm -r directory
-],
-[0],
-[ignore],
-[stderr])
])
AT_CLEANUP
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
-# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2008, 2009 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
sparsefile
Compare archive
],
-[tar: Record size = 12 blocks
-tar: Record size = 12 blocks
-],[],[],[pax])])
+[],[],[],[pax])])
# Process this file with autom4te to create testsuite. -*- Autotest -*-
# Test suite for GNU tar.
-# Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2007, 2008, 2009 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
abc
abc/CCC
],
-[tar: Record size = 5 blocks
-tar: Record size = 5 blocks
-])
+[])
AT_CLEANUP