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

Antoine Latter aslatter at gmail.com
Sat Jan 7 19:59:18 CET 2012


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-install.dpatch
Type: application/octet-stream
Size: 30982 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/cabal-devel/attachments/20120107/75beb907/attachment-0001.obj>


More information about the cabal-devel mailing list