[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Problem with tar + u:/ram



On 11/24/13 22:06, Miro Kropáček wrote:

On Mon, Nov 25, 2013 at 8:03 AM, Alan Hourihane <alanh@fairlite.co.uk <mailto:alanh@fairlite.co.uk>> wrote:

    So you're saying that the old tar works, and new tar doesn't and
    therefore you are not seeing a MiNT problem ??


I have corrected myself in the last email ;) So yes, there's a special MiNT case but it was hidden to me because the old tar is properly patched while the new one (incl. the one in the Sparemint repository now) is not. Now the question is, is the old src.rpm available somewhere? Because Peter not only didn't apply the patches but he also removed them from the RPM package.

Now I'm confused, because you said all that you did was replace the symlink from a real directory to u:/ram, so I'd thought you were using the same tar version between these two tests ?

Which is it ?

I've attached the two patches I can see from an older tar.

Alan.
===================================================================
RCS file: /cvsroot/tar/cvsroot/tar/tar/src/names.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- tar/src/names.c	2003/11/17 07:39:33	1.36
+++ tar/src/names.c	2003/12/25 10:19:40	1.37
@@ -1021,13 +1021,8 @@
 
       for (p = file_name + prefix_len; *p; )
 	{
-	  if (p[0] == '.')
-	    {
-	      if (p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
-		prefix_len = p + 2 - file_name;
-	      else if (ISSLASH (p[1]))
-		prefix_len = p + 1 - file_name;
-	    }
+          if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
+	    prefix_len = p + 2 - file_name;
 	  
 	  do
 	    {
@@ -1072,8 +1067,8 @@
 	  };
 	  WARN ((0, 0, _(diagnostic[link_target])));
 	}
-
-      p = ISSLASH (file_name[strlen(file_name)-1]) ? "./" : ".";
+      
+      p = ".";
     }
 
   return (char *) p;
===================================================================
RCS file: /cvsroot/tar/cvsroot/tar/tar/src/create.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- tar/src/create.c	2003/12/25 10:18:37	1.73
+++ tar/src/create.c	2004/01/03 11:45:31	1.74
@@ -981,9 +981,11 @@
 	  return;
 	}
     }
-  else if (!recursion_option)
+
+  if (!recursion_option)
     return;
-  else if (one_file_system_option
+
+  if (one_file_system_option
 	   && !top_level
 	   && parent_device != stat->stat.st_dev)
     {