Author: jonpryor
Date: 2005-07-14 14:17:25 -0400 (Thu, 14 Jul 2005)
New Revision: 47318
Modified:
trunk/mcs/tools/mono-shlib-cop/ChangeLog
trunk/mcs/tools/mono-shlib-cop/mono-shlib-cop.cs
Log:
* mono-shlib-cop.cs: Use RuntimeEnvironment.SystemConfigurationFile to find
$sysconfigdir/etc/mono/config, since $sysconfigdir might not be under
$prefix (the case for RPMs: $sysconfigdir=/etc, $prefix=/usr).
Fixes 75287.
Modified: trunk/mcs/tools/mono-shlib-cop/ChangeLog
===================================================================
--- trunk/mcs/tools/mono-shlib-cop/ChangeLog 2005-07-14 18:06:31 UTC (rev
47317)
+++ trunk/mcs/tools/mono-shlib-cop/ChangeLog 2005-07-14 18:17:25 UTC (rev
47318)
@@ -1,3 +1,10 @@
+2005-07-14 Jonathan Pryor <[EMAIL PROTECTED]>
+
+ * mono-shlib-cop.cs: Use RuntimeEnvironment.SystemConfigurationFile to
find
+ $sysconfigdir/etc/mono/config, since $sysconfigdir might not be under
+ $prefix (the case for RPMs: $sysconfigdir=/etc, $prefix=/usr).
+ Fixes 75287.
+
2005-06-06 Jonathan Pryor <[EMAIL PROTECTED]>
* mono-shlib-cop.cs: Use better default prefix handling (don't always
assume
Modified: trunk/mcs/tools/mono-shlib-cop/mono-shlib-cop.cs
===================================================================
--- trunk/mcs/tools/mono-shlib-cop/mono-shlib-cop.cs 2005-07-14 18:06:31 UTC
(rev 47317)
+++ trunk/mcs/tools/mono-shlib-cop/mono-shlib-cop.cs 2005-07-14 18:17:25 UTC
(rev 47318)
@@ -187,7 +187,7 @@
mono_configs = new XmlDocument [prefixes.Length];
for (int i = 0; i < mono_configs.Length; ++i) {
mono_configs [i] = new XmlDocument ();
- mono_configs [i].Load (prefixes [i] +
"/etc/mono/config");
+ mono_configs [i].Load (Path.Combine (prefixes
[i], "/etc/mono/config"));
}
}
@@ -503,9 +503,11 @@
AssemblyChecker checker = new AssemblyChecker ();
AssemblyCheckInfo report = new AssemblyCheckInfo ();
if (o.prefixes.Length == 0) {
+ // SystemConfigurationFile is
$sysconfdir/mono/VERSION/machine.config
+ // We want $sysconfdir
DirectoryInfo configDir =
- new DirectoryInfo
(RuntimeEnvironment.GetRuntimeDirectory());
- o.prefixes = new
string[]{configDir.Parent.Parent.Parent.ToString ()};
+ new FileInfo
(RuntimeEnvironment.SystemConfigurationFile).Directory.Parent.Parent.Parent;
+ o.prefixes = new string[]{configDir.ToString
()};
}
report.SetInstallationPrefixes (o.prefixes);
foreach (string assembly in o.RemainingArguments) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches