[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Ignore global package-db in package-plan/test-packages.pl



Hey,

I think I found a way not to have to run the package plan test script
in a clean (schroot) environment, namely by adding
`--ghc-pkg-option=--global-package-db=cabal-sandbox/packages` to all
cabal commands.

Since Cabal/cabal-install uses ghc-pkg to get the list of registered
packages and this overrides the global package-db path cabal should
only see packages in the sandbox created by the test script hence
completely ignoring the real global package-db.

This will however only work as long as the scripts don't try to
compile anything because then ghc will use it's hardcoded global
package-db again (which one can also override but seperately). As far
as I understand the package plan only let's cabal do dependency
resolution to see if there are any conflicts though so that should be
fine.

--Daniel

Attachment: pgpws2eNbBgC1.pgp
Description: PGP signature


Reply to: