[Mono-list] Incorrect path interpretation(gacutil)
Rafael Teixeira
rafael.teixeirabr at terra.com.br
Sun Jan 21 08:16:16 EST 2007
You were right: the logic in gacutil driver, gets confused with *nix,
absolute paths.
The following patch makes it behave correctly for your case, I'll be
posting a bugzilla case and attaching the patch for review, but you can
patch locally your gacutil in the meantime.
:)
Patch
-------------
Index: driver.cs
===================================================================
--- driver.cs (revision 71418)
+++ driver.cs (working copy)
@@ -574,7 +574,7 @@
private static bool IsSwitch (string arg)
{
- return (arg [0] == '-' || arg [0] == '/');
+ return (arg [0] == '-' || (arg [0] == '/' && !
arg.EndsWith(".dll") && arg.IndexOf('/', 1) < 0 ) );
}
private static Command GetCommand (string arg)
Index: ChangeLog
===================================================================
--- ChangeLog (revision 71418)
+++ ChangeLog (working copy)
@@ -1,3 +1,7 @@
+2007-01-21 Rafael Teixeira <rafaelteixeirabr at hotmail.com>
+
+ * driver.cs: accept absolute *nix paths for library names
without getting them confused with options
+
2006-07-24 Alp Toker <alp at atoker.com>
* driver.cs: Minor typo fixes in comments and informational
output.
On Mon, 2007-01-15 at 07:26 -0800, monoport wrote:
>
>
> A Rafael D Teixeira wrote:
> >
> > It is probably getting confused on parsing options.
> >
> > In your case it really gets confused because you have separated /i from
> > it's argument (the path to the library) with the unnecessary -f. Try:
> >
> > mono "/usr/lib/mono/lib/mono/1.0/gacutil.exe" -i
> > "/root/XXX/XXX/XXX/Assembly.dll"
> >
> > It should work.
> >
> > Try gacutil -? (or --help), to see the somewhat expanded list of options
> > Mono's implementation has, and also the unsupported ones.
> >
> > :)
> >
> >
>
> OK, I removed the "-f" option
> and again have:
>
> gacutil -i /root/xxx/xxx/xxx/assembly.dll
> Option /root/xxx/xxx/xxx/assembly.dll takes 1 argument
>
> Anyone have the mono installed on Linux, plz check.
> Is this working for you? I guess this is the bug.
>
> ----
> monoport
More information about the Mono-list
mailing list