[Mono-devel-list] Re: Potential GAC implementation ideas.

Michal Moskal malekith at pld-linux.org
Thu Oct 23 19:01:39 EDT 2003


On Thu, Oct 23, 2003 at 06:33:32PM -0400, Todd Berman wrote:
> Now, the more recent and long part of this thread is about how a packager
> can get his assembly to the gac.

For package managers:

a) gacutil should provide mode in which it will install just DLLs (not
   run ngen), and won't install it in / but in specified directory. This
   is best set with environment variable, GACUTIL_DESTDIR or something
   like this.
   
b) and second mode in which it will traverse it's directories and look
   for assemblies that are not ngened and ngen them

c) third mode in which it will look for ngened assemblies that have no
   corresponding DLL anymore.

ngened images are stored somewhere in /var/lib/monogac and rpm doesn't
touch them.

This way rpm spec could look like this (I assume very similar setting
for debs):

%install
# project Makefile has usual "gacutil /i foo.dll" call, but $GACUTIL_DESTDIR
# tells it not to run ngen and to use
# $GACUTIL_DESTDIR/usr/share/monogac/$version/$name/whatever and not
# /usr/share/monogac/$version/$name/whatever.

GACUTIL_DESTDIR=$RPM_BUILD_ROOT make install

%post
gacutil --ngen

%postun
gacutil --clean-ngen

%files
/usr/share/monogac/*


Different setting could be that pre-ngened binaries come with RPMS, this
would be harder to support I suppouse.

-- 
: Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv
: When in doubt, use brute force. -- Ken Thompson : {E-,w}-- {b++,e}>+++ h



More information about the Mono-devel-list mailing list