Joerg Schilling <[EMAIL PROTECTED]> wrote: > If you follow the POSIX rules for _creating_ tar archives, you cannot > have archivesize % TBLOCK != 0 > > As we do no longer live in the 1970s, it is obious to test for > impossible things and to warn.....
One does not create a reliable software system by inserting checks for
arbitrary "can't happen" conditions. But there is no need to discuss
this further since the argument does not apply to this case anyway:
$ gtar-1.15.1 cfb - 1 . | dd bs=1111 conv=sync | gtar-1.15.1 tvf - >/dev/null
1975+1 records in
1976+0 records out
gtar-1.15.1: Read 3976 bytes from -
$ gtar-1.15.1 cfb - 1 . | dd bs=1111 conv=sync | gtar-1.15.1 tvfb - 1 >/dev/null
1975+1 records in
1976+0 records out
$ gtar-1.15.1 cfb - 1 . | dd bs=55555 conv=sync | gtar-1.15.1 tvf - >/dev/null
39+1 records in
40+0 records out
$
This is not a meaningful validity check. The program just complains
if it cannot fill its input buffer completely; if the odd data is
positioned beyond the last buffer read, no warning is printed. I
still ask why the user should see the warning in the first case but
not in the other ones.
Besides, the warning is sometimes also printed if the input is
aligned at a 512-byte boundary but is just too small to fill the
read buffer completely:
$ gtar-1.15.1 cfb - 1 . | gtar-1.15.1 tvf - >/dev/null
gtar-1.15.1: Read 3072 bytes from -
$
Maybe this is what the original poster has been referring to. I
have created a test archive for this condition and attached it;
I get
$ bzcat t.bz2 | gtar-1.15.1 tvf -
-rw-r--r-- gunnar/other 8794 2005-04-20 13:43:19 data
gtar-1.15.1: Read 2048 bytes from -
$
> BSD tar does not work at all when a read size is not a multiple of 512.
It has a "B" option to work around that; some derivatives are smart
enough to enable it automatically.
Gunnar
t.bz2
Description: BZip2 compressed data
_______________________________________________ Bug-tar mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-tar
