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