[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: register packages via triggers



On Fri, Apr 03, 2009 at 07:55:02PM +0200, Joachim Breitner wrote:
> I???d like to seize a suggestion from kaol and bring it up for discussion.
> He mentioned, on IRC I think, that it might be feasible to register
> haskell packages not by maintainer scripts, but by putting the package
> description in a well-known directory and let ghc6 build the package
> data base from that directory, via triggers. This approach has been
> introduced for doc packages with 6.10.1 and has worked well, it seems.
> The advantage would be less maintainer scripts (thus reduced
> complexity). 
> 
> Kaol, do you still think this is a worthwhile change? Do you already
> have any plans about that?

Yes.  Registering and unregistering cabal packages is so simple that I
see little need for carrying around that logic in every package.

Things would get easier if we didn't even try to preserve local
changes to the global package registry.  I'm leaning towards doing
that, since it's easy to use multiple local packages.conf files,
instead.

I have nothing implemented yet.  It'd be straightforward to write a
trigger for /usr/lib/haskell-packages/ghc6/lib/ that would unregister
anything that didn't come with ghc6 package and register every
/usr/lib/haskell-packages/ghc6/lib/*/installed-pkg-config.

It'd make it easy to handle hiding and exposing packages when there
are multiple versions of a library installed at the same time, via
debconf dialog in ghc6 package itself.  Alternatively, we can take the
simple way out and leave all versions exposed and expect users to
uninstall a library package if they don't want to see it.


Reply to: