[Mono-devel-list] Re: [Mono-patches] r38899 - trunk/mcs/tools/gacutil

Raja R Harinath rharinath at novell.com
Sat Jan 15 06:48:57 EST 2005


Hi,

I think this delta reintroduces a Windows bug that was handled by the
old 'Symlink' code.  Specifically:

-  File.Copy (Path.Combine (link_path, asmb_file), ref_path);
+  File.Copy (name, ref_path);

since link_path cannot be assumed to be valid at the time gacutil is
run.

Thanks,
- Hari

>>> "Mike Kestner" <mkestner at mono-cvs.ximian.com> 01/14/05 3:17 AM >>>
Author: mkestner
Date: 2005-01-13 16:47:51 -0500 (Thu, 13 Jan 2005)
New Revision: 38899

Modified:
   trunk/mcs/tools/gacutil/ChangeLog
   trunk/mcs/tools/gacutil/driver.cs
Log:
2005-01-13  Mike Kestner  <mkestner at novell.com>

	* driver.cs: use relative symlinks for the package dir.

Modified: trunk/mcs/tools/gacutil/ChangeLog
===================================================================
--- trunk/mcs/tools/gacutil/ChangeLog	2005-01-13 21:25:04 UTC (rev
38898)
+++ trunk/mcs/tools/gacutil/ChangeLog	2005-01-13 21:47:51 UTC (rev
38899)
@@ -1,3 +1,7 @@
+2005-01-13  Mike Kestner  <mkestner at novell.com>
+
+	* driver.cs: use relative symlinks for the package dir.
+
 2005-01-11  Jackson Harper  <jackson at ximian.com>
 
 	* driver.cs: Make sure the actual assembly file exists when

Modified: trunk/mcs/tools/gacutil/driver.cs
===================================================================
--- trunk/mcs/tools/gacutil/driver.cs	2005-01-13 21:25:04 UTC (rev
38898)
+++ trunk/mcs/tools/gacutil/driver.cs	2005-01-13 21:47:51 UTC (rev
38899)
@@ -264,11 +264,14 @@
 					WriteLine ("ERROR: Could not
create package dir file.");
 					Environment.Exit (1);
 				}
-				Symlink (name, Path.Combine (link_path,
asmb_file), ref_path);
+ 				if (Path.DirectorySeparatorChar == '/')
{
+ 					symlink ("../gac/" + an.Name +
"/" + version_token + "/" + asmb_file, ref_path);
+ 				} else {
+ 					File.Copy (Path.Combine
(link_path, asmb_file), ref_path);
+ 				}
 
 				WriteLine ("Package exported to: " +
ref_path + " -> " +
 						Path.Combine (link_path,
asmb_file));
-
 			}
 
 			WriteLine ("{0} installed into the gac ({1})",
an.Name, gacdir);
@@ -560,17 +563,6 @@
 			return c;	 
 		}
 
-		// name = name of dll being installed
-		// oldpath = path the symlink points to -- cannot be
assumed to be a valid file
-		// newpath = name of symlink
-		private static void Symlink (string name, string
oldpath, string newpath) {
-			if (Path.DirectorySeparatorChar == '/') {
-				symlink (oldpath, newpath);
-			} else {
-				File.Copy (name, newpath);
-			}
-		}
-
 		[DllImport ("libc", SetLastError=true)]
 		public static extern int symlink (string oldpath, string
newpath);
 

_______________________________________________
Mono-patches maillist  -  Mono-patches at ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches




More information about the Mono-devel-list mailing list