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

Antoine Latter aslatter at gmail.com
Fri Feb 3 00:13:13 CET 2012


On Sat, Jan 7, 2012 at 12:59 PM, Antoine Latter <aslatter at gmail.com> 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.
>

Hello again,

I would create a bug for this, except trac is down after massive spamming.

Can someone review this patch? Sorry to be a bother, but the command
'cabal install --enable-tests --only-dependencies' is actually pretty
common for me, since I do a lot of work with 'cabal-dev' (and so am
re-installing dependencies all the time).

Antoine

> 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



More information about the cabal-devel mailing list