Bug 8330 - tar 1.13.16 doesn't always ignore failed read during incremental archive build
tar 1.13.16 doesn't always ignore failed read during incremental archive build
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: tar (Show other bugs)
6.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-01-10 08:40 EST by Jonathan Kamens
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-01-20 16:57:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jonathan Kamens 2000-01-10 08:40:10 EST
Tar 1.13.16 doesn't always ignore a failed read when it encounters one
while building an incremental archive, when --ignore-failed-read is set.
Here's a patch (not fully tested, but it's pretty straightforward):

--- src/incremen.c.orig	Mon Jan 10 08:40:42 2000
+++ src/incremen.c	Mon Jan 10 08:41:54 2000
@@ -228,7 +228,10 @@

 	      if (deref_stat (dereference_option, name_buffer, &stat_data))
 		{
-		  stat_error (name_buffer);
+                  if (ignore_failed_read_option && (errno == ENOENT))
+                    stat_warn (name_buffer);
+                  else
+                    stat_error (name_buffer);
 		  continue;
 		}
Comment 1 Bernhard Rosenkraenzer 2000-01-11 09:26:59 EST
Should be fixed in 1.3.17.
Comment 2 Jonathan Kamens 2000-01-13 09:26:59 EST
I found another place where failed reads are not ignored and should be.  Here's
an updated patch which covers both cases.

--- tar-1.13.16/src/incremen.c	Fri Dec 10 14:41:30 1999
+++ tar-1.13.16.new/src/incremen.c	Thu Jan 13 09:12:40 2000
@@ -228,7 +228,10 @@

 	      if (deref_stat (dereference_option, name_buffer, &stat_data))
 		{
-		  stat_error (name_buffer);
+                  if (ignore_failed_read_option && (errno == ENOENT))
+                    stat_warn (name_buffer);
+                  else
+                    stat_error (name_buffer);
 		  continue;
 		}

--- tar-1.13.16/src/names.c	Wed Dec  8 18:14:28 1999
+++ tar-1.13.16.new/src/names.c	Thu Jan 13 09:28:09 2000
@@ -822,7 +822,10 @@

       if (deref_stat (dereference_option, name->name, &statbuf) != 0)
 	{
-	  stat_error (name->name);
+          if (ignore_failed_read_option && (errno == ENOENT))
+            stat_warn (name->name);
+          else
+            stat_error (name->name);
 	  continue;
 	}
       if (S_ISDIR (statbuf.st_mode))
Comment 3 Jonathan Kamens 2000-01-20 16:57:59 EST
Neither the fix to incremen.c nor the fix to names.c appears in 1.13.17.
Comment 4 Bernhard Rosenkraenzer 2000-10-05 06:42:50 EDT
Thanks, fixed in 1.3.17-10

Note You need to log in before you can comment on or make changes to this bug.