Hi, I guess some of you have already seen this, if not, you should. We should evaluate if we can make use of this and if so, make it work with Debian as well. If possible, together with Magnus as to avoid a fork. Any takers? Thanks, Joachim -- Joachim "nomeata" Breitner Debian Developer nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata
--- Begin Message ---
- To: Planet Haskell <feed2imap@acme.com>
- Subject: Magnus Therning: On maintaining Haskell packages for a Linux distro
- From: Magnus <feed2imap@acme.com>
- Date: Mon, 24 Jan 2011 23:30:37 +0100
- Message-id: <PlanetHaskell-113991@acme.com>
Feed: Planet Haskell Item: Magnus Therning: On maintaining Haskell packages for a Linux distro When trying to maintain set of binary packages of Haskell libraries for a Linux distribution there are a few issues that come up:
- The set of packages must be compilable at all times, and
- Updating one package requires all packages that depend on it, in one or more steps, to be re-compiled.
The first requires keeping track of all dependencies of the packages in the set and making sure that they are satisfiable at all times. For a while I was doing this by simple attempting to compile all updated packages and check for breakages. Which was both time-consuming and a painful when build-failures had to be resolved.
The second requires bumping the package release number for all packages that are reachable when following the dependencies in the reverse direction. Doing this manually is tedious and very error prone in my experience.
Of course it ought to be possible to make this a lot easier with the help of a tool. The last few days I’ve been writing such a tool. This is how I’ve been using it so far.
Building the initial database
GHC in ArchLinux ships with a few Haskell libraries and ArchLinux also has a few Haskell packages in its base repositories. Since I don’t need to maintain any of those packages I decided to treat these as a sort of base. Adding those is as simple as this:
% head base-pkgs base,4.2.0.2 array,0.3.0.1 bytestring,0.9.1.7 Cabal,1.8.0.6 containers,0.3.0.0 directory,1.0.1.1 extensible-exceptions,0.1.1.1 filepath,1.1.0.4 haskell98,1.0.1.1 hpc,0.5.0.5 % cblrepo addbasepkg $(cat base-pkgs) SuccessThen I need to add the packages of the binary repo provided by ArchHaskell. I wrote a little script that extracts the package name and version from the ArchHaskell HABS tree (
get-ah-cabals
):#! /bin/bash habsdir=$1 for d in ${habsdir}/habs/*; do . ${d}/PKGBUILD case $_hkgname in (datetime|haskell-platform) ;; (*) echo ${_hkgname},${pkgver} ;; esac done echo http://hackage.haskell.org/platform/2010.2.0.0/haskell-platform.cabalSince
haskell-platform
isn’t on Hackage it requires special handling. The reason whydatetime
is excluded is slightly different. It’s the only package that requires oldbase
(version<4
).GHC
in Arch does whip with both old and newbase
sodatetime
can be built, butcblrepo
can’t deal with two versions of the same package. This is a limitation, but I’m not sure it’s worth fixing it sincebase
is the only library that comes in two versions, anddatetime
is the only package that hasn’t been updated to use newbase
.Knowing this it’s easy to add all the ArchHaskell packages to the database:
% cblrepo idxupdate % cblrepo add $(get-ah-cabals path/to/habs) SuccessAttempting an update
Now it’s possible to attempt to attempt an update:
% cblrepo add neither,0.2.0 Failed to satisfy the following dependencies for neither: monad-peel >=0.1 && <0.2 Adding neither 0.2.0 would break: yesod : neither >=0.1.0 && <0.2 persistent : neither >=0.1 && <0.2The way to read this is that there first of all is a missing dependency to satisfy for
neither
itself, and second there are two packages,yesod
andpersistent
, that wouldn’t be buildable ifneither
were updated.Now if it were possible to update
neither
, what packages would require a bump?% cblrepo bump neither persistent yesod
Date: Mon Jan 24 23:30:37 +0100 2011 Author: Magnus
--- End Message ---
Attachment:
signature.asc
Description: This is a digitally signed message part