Packages within a package

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Wed Oct 24 10:21:07 EDT 2007


On Wed, 2007-10-24 at 14:34 +0200, Henning Thielemann wrote:
> On Wed, 24 Oct 2007, Duncan Coutts wrote:

> > As far as I can see that covers all the cases where we might want
> > "distributions", "shipments" or "sub-packages". Of course if anyone has
> > any examples where they think our model might not cover things we should
> > bring them up and consider them.
> 
> If it becomes much easier to handle multiple packages this might work.
>   - Recompiling multiple packages must be simplified, because I use Cabal
> in the development phase.

Yes. We want to be able to build and use collections of packages inplace
and to handle rebuilding automatically.

Currently that has to be done manually by the developer which is a pain.
I'd like to see Cabal do proper dependency analysis within and between
packages in a source tree and build a single module dep graph and
rebuild minimally (and in parallel). If this sounds an awful lot like
make then that's no coincidence.

>   - It must be simple to distribute and to download multiple packages that
> belong together.

That is what cabal-install is for. It's available from hackage now
although as somewhat of a preview. We'd like feedback on it, bug reports
and patches. Then there are also the tools that convert cabal packages
into native system packages and then we can let the native package
manager handle the dependencies.

For example I would imagine distributing Gtk2Hs as several .tar.gz
packages on hackage. They would of course have interdependencies and
most probably with very strict version ranges. One could then
cabal-install the gtk package and have it pull in all of it's dependent
packages, or when the distro package catches up then one could install
that.

My main point here is that it's perfectly possible to distribute a
system as a bunch of packages. For example systems like Gnome or x.org's
X windows system are distributed as 100's of individual .tar.gz packages
with dependencies between them. This allows them to do incremental
releases of bits of the system without having to do everything in one
go.

> It would be nice if one could maintain several packages
> which share the same 'src' directory in one darcs repository, which is
> of course duplicated on distribution.

Right, when you do a cabal sdist then it makes a tarball which contains
all the files necessary to build that package. This may well duplicate
shared files.

Duncan


More information about the Libraries mailing list