Mads Kiilerich wrote: > Hi, > > It seems like GNU tar 1.21 emits warnings when "tar -tf -" get > unexpected chunk sizes on stdin. > > That causes test failure in the Mercurial test suite. > > A test case (also filed at > https://bugzilla.redhat.com/show_bug.cgi?id=487760 ): > > $ cat slowcat.py > import sys > for c in file(sys.argv[1]).read(): sys.stdout.write(c) > $ python slowcat.py test2.tar | tar tf - > /dev/null > tar: Record size = 8 blocks > $ > > > IMHO that is a regression from 1.20. Can you recommend a patch to > restore the silence?
Obviously it is change in behaviour (in tar 1.20 verbose level > 1 was
required to show that warning message). Attached patch should restore
silence again.
Greetings,
Ondrej Vasik
diff -urNp tar-1.21-orig/src/buffer.c tar-1.21/src/buffer.c
--- tar-1.21-orig/src/buffer.c 2008-11-30 13:30:29.000000000 +0100
+++ tar-1.21/src/buffer.c 2009-03-02 16:51:48.000000000 +0100
@@ -687,7 +687,7 @@ short_read (size_t status)
left = record_size - status;
if (left && left % BLOCKSIZE == 0
- && verbose_option
+ && (verbose_option > 1)
&& record_start_block == 0 && status != 0)
{
unsigned long rsize = status / BLOCKSIZE;
signature.asc
Description: Toto je digitálně podepsaná část zprávy
