tar warning

Bruce Dubbs bruce.dubbs at gmail.com
Sun Aug 2 11:41:39 PDT 2009


Sinve tar-1.21, there are spurious messages when extracting like:

Record size = 8 blocks

There is a fix for this in the git repository.  Should we apply this or just 
wait for the next release of tar?  Version 1.22 was released in March and 1.21 
in December, so I'd think a new release is probably not too far away.

If we add the patch, I don't think we should do it for 6.5, but just svn.

Speaking of tar, it's reasonably well known that tar has no man page.  Should we 
produce one from help2man? (http://ftp.gnu.org/gnu/help2man/) (CMMI  but perl 
module Locale::gettext is required)  By this, I'm suggesting that we might offer 
a download or tar.1, not install help2man.

   -- Bruce


diff --git a/src/buffer.c b/src/buffer.c
index 8edc257..a01af37 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -679,6 +679,19 @@ archive_read_error (void)
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)
{
@@ -690,7 +703,8 @@ 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,
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tar.1
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20090802/163d6545/attachment.ksh>


More information about the lfs-dev mailing list