registering packages in ghc using a directory of package files
duncan.coutts at worc.ox.ac.uk
Mon Mar 13 02:56:35 EST 2006
On Sun, 2006-03-12 at 21:41 +0000, Duncan Coutts wrote:
> I'm somewhat tempted to patch our current ghc to do this, it might be
> easier to get that working than to get our current hacks to work
Attached is the current patch I'm testing.
It's pretty minimal. It doesn't convert everything over to use a
directory of .conf files. It just makes ghc and ghc-pkg look for
package.conf.d/*.conf in addition to the normal package.conf.
So in fact ghc-pkg still registers by modifying the global package.conf
file. It's just that this allows us to register without using ghc-pkg at
all and directly dropping a file into the right directory.
In fact in Gentoo we already have such a directory. We keep a .conf file
per package anyway since we need these to be able to re-register
packages if ghc is reinstalled. So I've tested it by just symlinking:
/usr/lib/ghc-6.4.1/package.conf.d -> /usr/lib/ghc-6.4.1/gentoo/
So far this seems to work. ghc-pkg reports all the installed packages
and ghci can still load them up.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3490 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/libraries/attachments/20060313/3aa0c5ce/ghc-6.4.1-confdir.bin
More information about the Libraries