[Mono-devel-list] gacutil flags revisited

Raja R Harinath rharinath at novell.com
Wed Nov 3 01:49:33 EST 2004


Hi,

Mike Kestner <mkestner at ximian.com> writes:

> 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.

Actually, I think we should probably get rid of -gacdir and just use
relative links rather than absolute links.  -root should still be used,
and it can use $(DESTDIR).

Currently, my prefix=$HOME, and 

   /home/rharinath/lib/mono/1.0/System.dll

points to

   /home/rharinath/lib/mono/gac/System/1.0.5000.0__b77a5c561934e089/System.dll

IMO, it should be changed to point to

   ../gac/System/1.0.5000.0__b77a5c561934e089/System.dll

instead.  This will be valid even in the DESTDIR.

As a bonus, it will help us work-around b0rked build-buddy packaging
scripts that choose to use stuff like

  make install prefix=$DESTDIR/usr bindir=$DESTDIR/usr/bin

Going further, it would be nice if 'gacutil' supported a mode that is
almost like /usr/bin/install.

  gacutil -install foo.dll $(DESTDIR)$(gacrootdir)

works like

  gacutil -i -root $(DESTDIR)$(gacrootdir) foo.dll

So, we can say, with a new enough automake,

  gacrootdir = $(libdir)
  gacroot_DATA = foo.dll bar.dll
  gacroot_INSTALL = $(GACUTIL) -install

For some reason, I thoroughly dislike the idea of reading an environment
variable named DESTDIR.

- Hari



More information about the Mono-devel-list mailing list