[Mono-devel-list] gacutil flags revisited

Tom McLaughlin tmclaugh at sdf.lonestar.org
Wed Nov 3 02:10:57 EST 2004


On Tue, 2004-11-02 at 15:54 -0600, Mike Kestner wrote:
> I'd like to revisit a nagging problem related to gacutil.  
> 
> The current implementation of gacutil provides two flags that are
> similar but are a constant source of confusion related to gac
> installation.  To specify a specific gac path, you can provide either
> -root or -gacdir.  
> 
> The difference between the two is related to the additional use of a
> -package flag.  If you use -root, the link to the installed assembly
> that is created in the -package dir is "redirected" to the system
> gacdir.  This allows for packaging builds which are installed to
> temporary directories but end up with unbroken links when "redirected"
> by the package installer.  Think DESTDIR.  
> 
> -gacdir on the other hand makes -package links point at the assembly
> path as installed.  Think make install from source without DESTDIR.
> 

Thank you for explaining this!  On FreeBSD Mono is installed
into /usr/local but GTK# lives with Gnome in /usr/X11R6 as do all GTK#
dependent apps.  I've had to patch most apps locally while packaging to
handle this.

> <snip>
> 
> My suggestion is to make gacutil respect DESTDIR.  To support backward
> compatibility, I would leave -root and -gacdir exactly as they are.  We
> would add a new flag (call it -libdir, perhaps). If gacutil detects that
> DESTDIR is set, it should perform the current -root linkages while
> prepending DESTDIR to the -libdir path for the temporary installation
> target.  If DESTDIR is not set, the -gacdir linkages are performed and
> everything goes directly into -libdir.
> 
> This would allow the following syntax in Makefiles:
> 
> install-data-local:
> 	$(GACUTIL) -i $(ASSEMBLY) -f -libdir $(libdir)
> 
> and it would work for prefixed source builds and redirected package
> builds with no additional effort.
> 

Additionally, would it be possible for Mono to take into consideration
multiple GAC locations via a config file instead of through an
environmental variable?  I used a shell script wrapper as a temporary
solution to set additional locations with MONO_GAC_PREFIX and now we've
simply added /usr/X11R6 to the search path in mono/metadata/assembly.c .
[1] (%%X11BASE%% is a sed target the port's Makefile takes care of.)
This would really help packagers who have certain filesystem hierarchy
requirements to deal with.


[1] http://forge.novell.com/modules/xfmod/cvs/cvsbrowse.php/bsd-
sharp/FreeBSD-ports/lang/mono/files/patch-mono_metadata_assembly.c?
rev=1.1&content-type=text/vnd.viewcvs-markup

> And then peace and tranquility would rule the land.  
> 

Thanks,

Tom

-- 

BSD# Project - Porting Mono to FreeBSD
http://forge.novell.com/modules/xfmod/project/?bsd-sharp




More information about the Mono-devel-list mailing list