patch: --enable-tests and --only-dependencies

Johan Tibell johan.tibell at
Sat Jan 7 20:02:33 CET 2012

This has annoyed me as well. Thanks for fixing.

On Sat, Jan 7, 2012 at 10:59 AM, Antoine Latter <aslatter at> wrote:
> Hi Cabal,
> When trying to use "cabal install --enable-tests --only-dependencies"
> it appears to be passing the "--enable-tests" option down to the
> dependent packages during build.  This isn't what I want at all - I
> only want to use the "--enable-tests" flag for the purpose of building
> an install plan.
> In addition, the dependency solver doesn't solve dependencies as if
> dependent packages would be built with "--enable-tests", so the
> "configure" step for these packages fails due to missing dependencies.
> My proposed fix is to strip the 'configTests' flag from the
> ConfigFlags after building the install plan but before doing the
> installation itself, because passing 'enable-tests' to the 'configure'
> step during 'cabal install' doesn't make much sense to me anyway.
> An alternative fix would be to have a separate set of config flags per
> source package to be installed, with --enable-tests only turned on for
> the original target packages.
> A patch is attached.
> Antoine
> _______________________________________________
> cabal-devel mailing list
> cabal-devel at

More information about the cabal-devel mailing list