patch applied (cabal): Deprecate defaultUserHooks, export autoconfUserHooks. Fix ticket #165

Duncan Coutts duncan.coutts at
Mon Jan 28 19:12:44 EST 2008

On Mon, 2008-01-28 at 18:16 +0000, Ross Paterson wrote:
> On Mon, Jan 21, 2008 at 08:38:49AM -0800, Duncan Coutts wrote:
> > Mon Jan 21 08:34:11 PST 2008  Duncan Coutts <duncan at>
> >   * Deprecate defaultUserHooks, export autoconfUserHooks. Fix ticket #165
> >   Setup scripts should switch to simpleUserHooks or autoconfUserHooks.
> >   autoconfUserHooks now fails if ./configure is not present.
> >   defaultUserHooks does the same thing it always did.
> This means that a package with build-type: Configure but no configure
> script now fails configure (e.g. mersenne-random-pure64-0.1).

Hmm, "build-type: Configure" is relatively new, we can either live with
the few failures that causes or switch "build-type: Configure" to use
the old code (ie defaultUserHooks rather than autoconfUserHooks).

It should be relatively easy to check how many packages this affects. In
fact, let me do so...

I downloaded a complete copy of the hackage arcive a couple days ago, so
I've missed out mersenne-random-pure64.

pkgs=$(grep -i 'build-type' hackage/*/*/*.cabal \
      | grep Configure | cut -d '/' -f 1,2,3)

There are 26 versions of 16 distinct packages that use build-type:

for pkg in $pkgs; do
  tar -tzf $pkg/*.tar.gz | grep configure > /dev/null \
    || echo "FAIL: $pkg"

Of those 5 have no configure file:


So all the ones apart from mersenne-random are core packages. People
tend not to build these since they're already installed. Incidentally
the Win32 one is old (as is unix).

So, what's the verdict? Take a hard line or not? Seems to me we could
get away with it.


More information about the cabal-devel mailing list