Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 8330 - tar 1.13.16 doesn't always ignore failed read during incremental archive build
Summary: tar 1.13.16 doesn't always ignore failed read during incremental archive build
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tar
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-01-10 13:40 UTC by Jonathan Kamens
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-01-20 21:57:06 UTC


Attachments (Terms of Use)

Description Jonathan Kamens 2000-01-10 13:40:10 UTC
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 14:26:59 UTC
Should be fixed in 1.3.17.

Comment 2 Jonathan Kamens 2000-01-13 14:26:59 UTC
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 21:57:59 UTC
Neither the fix to incremen.c nor the fix to names.c appears in 1.13.17.

Comment 4 Bernhard Rosenkraenzer 2000-10-05 10:42:50 UTC
Thanks, fixed in 1.3.17-10


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