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

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



Am 25. Oktober 2014 23:38:42 MESZ, schrieb "Daniel Gröber" <dxld@darkboxed.org>:
>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

Hi Daniel,

good job! This probably neans that we have to add the libraries shipped with GHC to packages.txt as well (which is probably a good thing). If it works for you, go ahead and push it.

Greetings, Joachim


Reply to: