Why cabal forces reinstallation of happstack-utils?

3
I try to configure happstack with parsec 3.1. It seems to fail due to cabal: I installed happstack-util editing happstack-util.cabal by hand: % grep parsec ~/.ghc/x86_64-linux-6.12.2/package.conf.d/happstack-util-0.5.0-6e27d5d3ba1c07f259d463ee3036c92b.conf parsec-3.1.0-5842597f447f82b210228391f371cff1 % cabal install --constraint 'parsec > 3' --dry-run happstack Resolving dependencies... cabal: cannot configure happstack-util-0.5.0. It requires parsec <3 For the dependency on parsec <3 there are these packages: parsec-2.0, parsec-2.1.0.0 and parsec-2.1.0.1. However none of them are available. parsec-2.0 was excluded because of the top level dependency parsec >3 parsec-2.1.0.0 was excluded because of the top level dependency parsec parsec-2.1.0.1 was excluded because of the top level dependency parsec
3 % ghc-pkg list | grep happstack-util happstack-util-0.5.0
Regards

On Mittwoch 05 Mai 2010 00:55:38, Maciej Piechotka wrote:
I try to configure happstack with parsec 3.1. It seems to fail due to cabal:
happstack-util.cabal says parsec < 3, so --constraint="parsec > 3" and the given dependencies are incompatible, hence it can't be configured. Probably parsec < 3 was specified because parsec-3.0 was significantly slower than parsec-2.*.

On Wed, 2010-05-05 at 01:09 +0200, Daniel Fischer wrote:
On Mittwoch 05 Mai 2010 00:55:38, Maciej Piechotka wrote:
I try to configure happstack with parsec 3.1. It seems to fail due to cabal:
happstack-util.cabal says parsec < 3, so --constraint="parsec > 3" and the given dependencies are incompatible, hence it can't be configured.
Probably parsec < 3 was specified because parsec-3.0 was significantly slower than parsec-2.*.
I updated local copy, as shown, but cabal wants to rebuild it anyway. My question was rather why the repo is considered at all when the package is installed. Regards

On Wednesday 05 May 2010 01:45:29, Maciej Piechotka wrote:
I updated local copy, as shown, but cabal wants to rebuild it anyway. My question was rather why the repo is considered at all when the package is installed.
Regards
Okay, I didn't quite understand your question, sorry. So, what's the situation? You unpacked happstack-util, edited the cabal file to allow parsec-3.1, cd'ed to the unpacked directory and ran cabal install there, so you had happstack-util installed. Then you ran cabal install --dry-run and it said Resolving dependencies... cabal: cannot configure happstack-util-0.5.0. Is that correct? I don't know why cabal does that. As a guess: it looks at the .cabal file in the package index to find out what's needed, compares with the output of ghc-pkg list, finds a missing dependency (parsec-2.*) and decides to reinstall.

On Wed, 2010-05-05 at 02:17 +0200, Daniel Fischer wrote:
On Wednesday 05 May 2010 01:45:29, Maciej Piechotka wrote:
I updated local copy, as shown, but cabal wants to rebuild it anyway. My question was rather why the repo is considered at all when the package is installed.
Regards
Okay, I didn't quite understand your question, sorry. So, what's the situation? You unpacked happstack-util, edited the cabal file to allow parsec-3.1, cd'ed to the unpacked directory and ran cabal install there, so you had happstack-util installed. Then you ran cabal install --dry-run and it said Resolving dependencies... cabal: cannot configure happstack-util-0.5.0.
Is that correct?
No. 1. I downloaded happstack-utile[1] 2. Edited cabal file 3. Installed it successfully linking with parsec 3.1 4. I tried to run cabal install happstack --constraint 'parsec >= 3' 5. It complains that happstack-utile needs to be installed against parsec 2 If I just run: % runhaskell Setup.hs configure --user All seems to be ok but % cabal install Wants to reinstall packages (or complains about constraints).
I don't know why cabal does that. As a guess: it looks at the .cabal file in the package index to find out what's needed, compares with the output of ghc-pkg list, finds a missing dependency (parsec-2.*) and decides to reinstall.
It is not a missing dependency. It is that the cabal-install tries to use dependencies from hackage instead of installed packages. Regards [1] Now it is HStringTemplate but problem is the same

On 5 May 2010 12:04, Maciej Piechotka
1. I downloaded happstack-utile[1] 2. Edited cabal file 3. Installed it successfully linking with parsec 3.1 4. I tried to run cabal install happstack --constraint 'parsec >= 3' 5. It complains that happstack-utile needs to be installed against parsec 2
[1] Now it is HStringTemplate but problem is the same
Did you try editing the HStringTemplate cabal file to remove its constraint against parsec >= 3? Also, is there any reason why you're forcing that constraint through (yes, upstream should start using parec-3, but why use --constraint to try and force it yourself)?
If I just run: % runhaskell Setup.hs configure --user All seems to be ok but % cabal install Wants to reinstall packages (or complains about constraints).
Note that with its dependency resolution stuff, cabal-install tries to ensure you have an entire working and consistent set of dependencies, whereas doing it manually will happily break everything.
It is not a missing dependency. It is that the cabal-install tries to use dependencies from hackage instead of installed packages.
Not quite: if its already installed and working, cabal-install will use it; if there is some inconsistency (e.g. package Foo was built against Bar-x but you now have Bar-y installed) then cabal-install will try rebuilding that package; note that if you installed it from a local edited repository then cabal-install doesn't know this and will get the official hackage version. Also, I note that you seem to use the Gentoo Haskell overlay (as you've made bug reports about it) but you're also building packages by hand; this can also lead to problems (don't mix your packages kids!). -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

On Wed, 2010-05-05 at 12:13 +1000, Ivan Miljenovic wrote:
On 5 May 2010 12:04, Maciej Piechotka
wrote: 1. I downloaded happstack-utile[1] 2. Edited cabal file 3. Installed it successfully linking with parsec 3.1 4. I tried to run cabal install happstack --constraint 'parsec >= 3' 5. It complains that happstack-utile needs to be installed against parsec 2
[1] Now it is HStringTemplate but problem is the same
Did you try editing the HStringTemplate cabal file to remove its constraint against parsec >= 3?
Yes. See point 2.
Also, is there any reason why you're forcing that constraint through (yes, upstream should start using parec-3, but why use --constraint to try and force it yourself)?
=3
=3 mpiechotka@localhost ~ % cabal install happstack -dry-run -v unrecognized option `-dry-run' mpiechotka@localhost ~ % cabal install happstack --dry-run -v /usr/bin/ghc --numeric-version looking for package tool: ghc-pkg near compiler in /usr/bin found package tool in /usr/bin/ghc-pkg /usr/bin/ghc-pkg --version /usr/bin/ghc --supported-languages Reading installed packages... /usr/bin/ghc-pkg dump --global /usr/bin/ghc-pkg dump --user /usr/bin/ghc --print-libdir Reading available packages... Resolving dependencies... selecting happstack-0.5.0 (hackage) and discarding HStringTemplate-0.2, 0.3, 0.3.1, 0.3.2, 0.4, 0.4.1, 0.4.2, happstack-0.2.1, 0.3.1, 0.3.2, 0.4.1, happstack-data-0.1, 0.2.1, 0.3.1, 0.3.2, 0.3.3, 0.4.1, happstack-ixset-0.1, 0.2.1, 0.3.1, 0.3.2, 0.4.1, happstack-server-0.1, 0.2.1, 0.3.1, 0.3.2, 0.3.3, 0.4.1, happstack-state-0.1, 0.2.1, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.4.1, happstack-util-0.1, 0.2.1, 0.3.1, 0.3.2, 0.4.1, harp-0.2.1, hsp-0.2, 0.4, 0.4.4, 0.4.5, 0.5.0, 0.5.1, hsx-0.4, 0.4.4, 0.4.5, 0.4.6, 0.4.8, 0.5.0, 0.5.1, 0.5.2, 0.5.5, 0.5.6, 0.6.0, 0.6.1 and 0.6.2 selecting happstack-data-0.5.0 (hackage) and discarding HaXml-1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.19.6, 1.19.7, 1.20, 1.20.1, 1.20.2, syb-with-class-0.1, 0.2, 0.3, 0.4, 0.5, 0.5.1, 0.6, text-0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.7.0.1, time-1.0, 1.1.2.0, 1.1.2.1, 1.1.2.2, 1.1.2.3, 1.1.2.4 and 1.1.3 selecting happstack-server-0.5.0 (hackage) and discarding sendfile-0.1, 0.2, 0.3, 0.3.1, 0.4, 0.5, utf8-string-0.1, 0.2, 0.3, 0.3.1, 0.3.1.1, 0.3.2 and 0.3.3 selecting happstack-state-0.5.0 (hackage) selecting harp-0.4 (installed or hackage) selecting hsp-0.5.2 (installed or hackage) and discarding HJScript-0.4, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8 and 0.4.9 selecting HJScript-0.5.0 (installed or hackage) and discarding HJavaScript-0.4, 0.4.4 and 0.4.5 selecting hsx-0.7.0 (installed or hackage) and discarding haskell-src-exts-0.2.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.7, 0.3.9, 0.3.10, 0.3.11, 0.3.12, 0.4.1, 0.4.2, 0.4.3, 0.4.3.1, 0.4.4, 0.4.4.1, 0.4.5, 0.4.6, 0.4.8, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.3, 1.1.3.1, 1.1.4, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5 and 1.4.0 selecting sendfile-0.6.1 (hackage) selecting syb-with-class-0.6.1 (installed or hackage) and discarding template-haskell-2.2.0.0, 2.3.0.0 and 2.3.0.1 selecting syb-with-class-instances-text-0.0.1 (installed or hackage) selecting text-0.7.1.0 (installed or hackage) and discarding deepseq-1.0.0.0 selecting deepseq-1.1.0.0 (installed or hackage) and discarding array-0.1.0.0, containers-0.1.0.0 and 0.1.0.1 selecting ghc-prim-0.2.0.0 (installed) selecting ffi-1.0 (installed) selecting rts-1.0 (installed) selecting zlib-0.5.2.0 (installed or hackage) and discarding zlib-0.2, 0.3, 0.4, 0.4.0.1, 0.4.0.2, 0.4.0.3, 0.4.0.4 and 0.5.0.0 selecting html-1.0.1.2 (installed or hackage) and discarding html-1.0 and 1.0.1.1 selecting xhtml-3000.2.0.1 (installed or hackage) and discarding xhtml-3000.0.0, 3000.0.1, 3000.0.2.1, 3000.0.2.2, 3000.1.0.0 and 3000.2.0.0 selecting stm-2.1.1.2 (installed or hackage) and discarding stm-2.1, 2.1.1.0 and 2.1.2.0 selecting happstack-ixset-0.5.0.1 (hackage) and discarding happstack-ixset-0.5.0 selecting happstack-util-0.5.0.1 (installed or hackage) and discarding SMTPClient-0.1, 0.2, 0.3, 1.0, 1.0.1, happstack-util-0.5.0, network-2.0 and 2.1.0.0 selecting SMTPClient-1.0.2 (installed or hackage) and discarding hsemail-1.0, 1.1, 1.2, 1.3, 1.4 and 1.5 selecting hsemail-1.6 (installed or hackage) selecting unix-compat-0.1.2.1 (installed or hackage) and discarding unix-compat-0.1, 0.1.1 and 0.1.2.0 selecting strict-concurrency-0.2.3 (installed or hackage) and discarding strict-concurrency-0.1, 0.2, 0.2.1 and 0.2.2 selecting hslogger-1.0.10 (installed or hackage) and discarding hslogger-1.0.2, 1.0.4, 1.0.5, 1.0.6, 1.0.7 and 1.0.9 selecting binary-0.5.0.2 (installed or hackage) and discarding binary-0.2, 0.3, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.4.3.1, 0.4.4, 0.5 and 0.5.0.1 selecting MaybeT-0.1.2 (hackage) and discarding MaybeT-0.1.0 and 0.1.1 selecting HaXml-1.13.3 (hackage) and discarding HaXml-1.13.2 selecting network-2.2.1.7 (installed or hackage) and discarding network-2.2.0.0, 2.2.0.1, 2.2.1, 2.2.1.1, 2.2.1.2, 2.2.1.3, 2.2.1.4, 2.2.1.5 and 2.2.1.6 selecting HStringTemplate-0.6.2 (installed or hackage) and discarding HStringTemplate-0.4.3, 0.5, 0.5.1, 0.5.1.1, 0.5.1.2, 0.5.1.3, 0.6, 0.6.1,
=3
Because it would download and rebuild packages on its own: % cabal install happstack --dry-run -v /usr/bin/ghc --numeric-version looking for package tool: ghc-pkg near compiler in /usr/bin found package tool in /usr/bin/ghc-pkg /usr/bin/ghc-pkg --version /usr/bin/ghc --supported-languages Reading installed packages... /usr/bin/ghc-pkg dump --global /usr/bin/ghc-pkg dump --user /usr/bin/ghc --print-libdir Reading available packages... Resolving dependencies... selecting happstack-0.5.0 (hackage) and discarding HStringTemplate-0.2, 0.3, 0.3.1, 0.3.2, 0.4, 0.4.1, 0.4.2, happstack-0.2.1, 0.3.1, 0.3.2, 0.4.1, happstack-data-0.1, 0.2.1, 0.3.1, 0.3.2, 0.3.3, 0.4.1, happstack-ixset-0.1, 0.2.1, 0.3.1, 0.3.2, 0.4.1, happstack-server-0.1, 0.2.1, 0.3.1, 0.3.2, 0.3.3, 0.4.1, happstack-state-0.1, 0.2.1, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.4.1, happstack-util-0.1, 0.2.1, 0.3.1, 0.3.2, 0.4.1, harp-0.2.1, hsp-0.2, 0.4, 0.4.4, 0.4.5, 0.5.0, 0.5.1, hsx-0.4, 0.4.4, 0.4.5, 0.4.6, 0.4.8, 0.5.0, 0.5.1, 0.5.2, 0.5.5, 0.5.6, 0.6.0, 0.6.1 and 0.6.2 selecting happstack-data-0.5.0 (hackage) and discarding HaXml-1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.19.6, 1.19.7, 1.20, 1.20.1, 1.20.2, syb-with-class-0.1, 0.2, 0.3, 0.4, 0.5, 0.5.1, 0.6, text-0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.7.0.1, time-1.0, 1.1.2.0, 1.1.2.1, 1.1.2.2, 1.1.2.3, 1.1.2.4 and 1.1.3 selecting happstack-server-0.5.0 (hackage) and discarding sendfile-0.1, 0.2, 0.3, 0.3.1, 0.4, 0.5, utf8-string-0.1, 0.2, 0.3, 0.3.1, 0.3.1.1, 0.3.2 and 0.3.3 selecting happstack-state-0.5.0 (hackage) selecting harp-0.4 (installed or hackage) selecting hsp-0.5.2 (installed or hackage) and discarding HJScript-0.4, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8 and 0.4.9 selecting HJScript-0.5.0 (installed or hackage) and discarding HJavaScript-0.4, 0.4.4 and 0.4.5 selecting hsx-0.7.0 (installed or hackage) and discarding haskell-src-exts-0.2.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.7, 0.3.9, 0.3.10, 0.3.11, 0.3.12, 0.4.1, 0.4.2, 0.4.3, 0.4.3.1, 0.4.4, 0.4.4.1, 0.4.5, 0.4.6, 0.4.8, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.3, 1.1.3.1, 1.1.4, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5 and 1.4.0 selecting sendfile-0.6.1 (hackage) selecting syb-with-class-0.6.1 (installed or hackage) and discarding template-haskell-2.2.0.0, 2.3.0.0 and 2.3.0.1 selecting syb-with-class-instances-text-0.0.1 (installed or hackage) selecting text-0.7.1.0 (installed or hackage) and discarding deepseq-1.0.0.0 selecting deepseq-1.1.0.0 (installed or hackage) and discarding array-0.1.0.0, containers-0.1.0.0 and 0.1.0.1 selecting ghc-prim-0.2.0.0 (installed) selecting ffi-1.0 (installed) selecting rts-1.0 (installed) selecting zlib-0.5.2.0 (installed or hackage) and discarding zlib-0.2, 0.3, 0.4, 0.4.0.1, 0.4.0.2, 0.4.0.3, 0.4.0.4 and 0.5.0.0 selecting html-1.0.1.2 (installed or hackage) and discarding html-1.0 and 1.0.1.1 selecting xhtml-3000.2.0.1 (installed or hackage) and discarding xhtml-3000.0.0, 3000.0.1, 3000.0.2.1, 3000.0.2.2, 3000.1.0.0 and 3000.2.0.0 selecting stm-2.1.1.2 (installed or hackage) and discarding stm-2.1, 2.1.1.0 and 2.1.2.0 selecting happstack-ixset-0.5.0.1 (hackage) and discarding happstack-ixset-0.5.0 selecting happstack-util-0.5.0.1 (installed or hackage) and discarding SMTPClient-0.1, 0.2, 0.3, 1.0, 1.0.1, happstack-util-0.5.0, network-2.0 and 2.1.0.0 selecting SMTPClient-1.0.2 (installed or hackage) and discarding hsemail-1.0, 1.1, 1.2, 1.3, 1.4 and 1.5 selecting hsemail-1.6 (installed or hackage) selecting unix-compat-0.1.2.1 (installed or hackage) and discarding unix-compat-0.1, 0.1.1 and 0.1.2.0 selecting strict-concurrency-0.2.3 (installed or hackage) and discarding strict-concurrency-0.1, 0.2, 0.2.1 and 0.2.2 selecting hslogger-1.0.10 (installed or hackage) and discarding hslogger-1.0.2, 1.0.4, 1.0.5, 1.0.6, 1.0.7 and 1.0.9 selecting binary-0.5.0.2 (installed or hackage) and discarding binary-0.2, 0.3, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.4.3.1, 0.4.4, 0.5 and 0.5.0.1 selecting MaybeT-0.1.2 (hackage) and discarding MaybeT-0.1.0 and 0.1.1 selecting HaXml-1.13.3 (hackage) and discarding HaXml-1.13.2 selecting network-2.2.1.7 (installed or hackage) and discarding network-2.2.0.0, 2.2.0.1, 2.2.1, 2.2.1.1, 2.2.1.2, 2.2.1.3, 2.2.1.4, 2.2.1.5 and 2.2.1.6 selecting HStringTemplate-0.6.2 (installed or hackage) and discarding HStringTemplate-0.4.3, 0.5, 0.5.1, 0.5.1.1, 0.5.1.2, 0.5.1.3, 0.6, 0.6.1, parsec-3.0.0, 3.0.1 and 3.1.0 selecting parsec-2.1.0.1 (installed or hackage) and discarding parsec-2.0 and 2.1.0.0 selecting parallel-2.2.0.1 (installed or hackage) and discarding parallel-1.0.0.0, 1.0.0.1, 1.1.0.0, 1.1.0.1, 2.0.0.0, 2.1.0.0 and 2.2.0.0 selecting utf8-string-0.3.6 (installed or hackage) and discarding utf8-string-0.3.4 and 0.3.5 selecting haskell-src-exts-1.8.2 (installed or hackage) and discarding haskell-src-exts-1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.6.0, 1.6.1, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1 and 1.9.0 selecting cpphs-1.11 (installed or hackage) and discarding cpphs-1.3, 1.5, 1.6, 1.7, 1.8, 1.9 and 1.10 selecting haskell98-1.0.1.1 (installed or hackage) and discarding haskell98-1.0 and 1.0.1.0 selecting HJavaScript-0.4.7 (installed or hackage) and discarding HJavaScript-0.4.6 selecting HUnit-1.2.2.1 (installed or hackage) and discarding HUnit-1.1, 1.2.0.0, 1.2.0.1, 1.2.0.2, 1.2.0.3 and 1.2.2.0 selecting random-1.0.0.2 (installed or hackage) and discarding random-1.0.0.0 and 1.0.0.1 selecting time-1.1.4 (installed or hackage) and discarding time-1.2, 1.2.0.1 and 1.2.0.2 selecting template-haskell-2.4.0.1 (installed or hackage) and discarding template-haskell-2.4.0.0 selecting bytestring-0.9.1.6 (installed or hackage) and discarding bytestring-0.9, 0.9.0.1, 0.9.0.2, 0.9.0.3, 0.9.0.4, 0.9.1.0, 0.9.1.1, 0.9.1.2, 0.9.1.3, 0.9.1.4 and 0.9.1.5 selecting extensible-exceptions-0.1.1.2 (installed or hackage) and discarding extensible-exceptions-0.1.0.1, 0.1.1.0 and 0.1.1.1 selecting mtl-1.1.0.2 (installed or hackage) and discarding mtl-1.0, 1.1.0.0 and 1.1.0.1 selecting process-1.0.1.2 (installed or hackage) and discarding filepath-1.0, process-1.0.0.0 and 1.0.1.1 selecting pretty-1.0.1.1 (installed or hackage) and discarding pretty-1.0.0.0 and 1.0.1.0 selecting directory-1.0.1.1 (installed or hackage) and discarding directory-1.0.0.0, 1.0.0.3 and 1.0.1.0 selecting unix-2.4.0.1 (installed or hackage) and discarding unix-2.0, 2.2.0.0, 2.3.0.0, 2.3.1.0, 2.3.2.0 and 2.4.0.0 selecting old-time-1.0.0.4 (installed or hackage) and discarding old-time-1.0.0.0, 1.0.0.2 and 1.0.0.3 selecting old-locale-1.0.0.2 (installed or hackage) and discarding old-locale-1.0.0.0 and 1.0.0.1 selecting filepath-1.1.0.4 (installed or hackage) and discarding filepath-1.1.0.0, 1.1.0.1, 1.1.0.2 and 1.1.0.3 selecting containers-0.3.0.0 (installed or hackage) and discarding containers-0.2.0.0 and 0.2.0.1 selecting array-0.3.0.0 (installed or hackage) and discarding array-0.2.0.0 selecting base-3.0.3.2 (installed) and 4.2.0.1 (installed) and discarding syb-0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.2 and 0.2.1 selecting integer-gmp-0.2.0.1 (installed) selecting syb-0.1.0.2 (installed) In order, the following would be installed: HStringTemplate-0.6.2 (reinstall) changes: parsec-3.1.0 -> 2.1.0.1 HaXml-1.13.3 (new version) MaybeT-0.1.2 (new package) hsemail-1.6 (reinstall) changes: parsec-3.1.0 -> 2.1.0.1 network-2.2.1.7 (reinstall) changes: parsec-3.1.0 -> 2.1.0.1 SMTPClient-1.0.2 (reinstall) hslogger-1.0.10 (reinstall) happstack-util-0.5.0.1 (reinstall) changes: parsec-3.1.0 -> 2.1.0.1 happstack-data-0.5.0 (new package) happstack-ixset-0.5.0.1 (new package) happstack-state-0.5.0 (new package) sendfile-0.6.1 (new package) happstack-server-0.5.0 (new package) happstack-0.5.0 (new package) cabal install happstack --constraint 'parsec >= 3' Resolving dependencies... cabal: cannot configure HStringTemplate-0.6.2. It requires parsec <3 For the dependency on parsec <3 there are these packages: parsec-2.0, parsec-2.1.0.0 and parsec-2.1.0.1. However none of them are available. parsec-2.0 was excluded because of the top level dependency parsec >=3 parsec-2.1.0.0 was excluded because of the top level dependency parsec parsec-2.1.0.1 was excluded because of the top level dependency parsec parsec-3.0.0, 3.0.1 and 3.1.0 selecting parsec-2.1.0.1 (installed or hackage) and discarding parsec-2.0 and 2.1.0.0 selecting parallel-2.2.0.1 (installed or hackage) and discarding parallel-1.0.0.0, 1.0.0.1, 1.1.0.0, 1.1.0.1, 2.0.0.0, 2.1.0.0 and 2.2.0.0 selecting utf8-string-0.3.6 (installed or hackage) and discarding utf8-string-0.3.4 and 0.3.5 selecting haskell-src-exts-1.8.2 (installed or hackage) and discarding haskell-src-exts-1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.6.0, 1.6.1, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1 and 1.9.0 selecting cpphs-1.11 (installed or hackage) and discarding cpphs-1.3, 1.5, 1.6, 1.7, 1.8, 1.9 and 1.10 selecting haskell98-1.0.1.1 (installed or hackage) and discarding haskell98-1.0 and 1.0.1.0 selecting HJavaScript-0.4.7 (installed or hackage) and discarding HJavaScript-0.4.6 selecting HUnit-1.2.2.1 (installed or hackage) and discarding HUnit-1.1, 1.2.0.0, 1.2.0.1, 1.2.0.2, 1.2.0.3 and 1.2.2.0 selecting random-1.0.0.2 (installed or hackage) and discarding random-1.0.0.0 and 1.0.0.1 selecting time-1.1.4 (installed or hackage) and discarding time-1.2, 1.2.0.1 and 1.2.0.2 selecting template-haskell-2.4.0.1 (installed or hackage) and discarding template-haskell-2.4.0.0 selecting bytestring-0.9.1.6 (installed or hackage) and discarding bytestring-0.9, 0.9.0.1, 0.9.0.2, 0.9.0.3, 0.9.0.4, 0.9.1.0, 0.9.1.1, 0.9.1.2, 0.9.1.3, 0.9.1.4 and 0.9.1.5 selecting extensible-exceptions-0.1.1.2 (installed or hackage) and discarding extensible-exceptions-0.1.0.1, 0.1.1.0 and 0.1.1.1 selecting mtl-1.1.0.2 (installed or hackage) and discarding mtl-1.0, 1.1.0.0 and 1.1.0.1 selecting process-1.0.1.2 (installed or hackage) and discarding filepath-1.0, process-1.0.0.0 and 1.0.1.1 selecting pretty-1.0.1.1 (installed or hackage) and discarding pretty-1.0.0.0 and 1.0.1.0 selecting directory-1.0.1.1 (installed or hackage) and discarding directory-1.0.0.0, 1.0.0.3 and 1.0.1.0 selecting unix-2.4.0.1 (installed or hackage) and discarding unix-2.0, 2.2.0.0, 2.3.0.0, 2.3.1.0, 2.3.2.0 and 2.4.0.0 selecting old-time-1.0.0.4 (installed or hackage) and discarding old-time-1.0.0.0, 1.0.0.2 and 1.0.0.3 selecting old-locale-1.0.0.2 (installed or hackage) and discarding old-locale-1.0.0.0 and 1.0.0.1 selecting filepath-1.1.0.4 (installed or hackage) and discarding filepath-1.1.0.0, 1.1.0.1, 1.1.0.2 and 1.1.0.3 selecting containers-0.3.0.0 (installed or hackage) and discarding containers-0.2.0.0 and 0.2.0.1 selecting array-0.3.0.0 (installed or hackage) and discarding array-0.2.0.0 selecting base-3.0.3.2 (installed) and 4.2.0.1 (installed) and discarding syb-0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.2 and 0.2.1 selecting integer-gmp-0.2.0.1 (installed) selecting syb-0.1.0.2 (installed) In order, the following would be installed: HStringTemplate-0.6.2 (reinstall) changes: parsec-3.1.0 -> 2.1.0.1 HaXml-1.13.3 (new version) MaybeT-0.1.2 (new package) hsemail-1.6 (reinstall) changes: parsec-3.1.0 -> 2.1.0.1 network-2.2.1.7 (reinstall) changes: parsec-3.1.0 -> 2.1.0.1 SMTPClient-1.0.2 (reinstall) hslogger-1.0.10 (reinstall) happstack-util-0.5.0.1 (reinstall) changes: parsec-3.1.0 -> 2.1.0.1 happstack-data-0.5.0 (new package) happstack-ixset-0.5.0.1 (new package) happstack-state-0.5.0 (new package) sendfile-0.6.1 (new package) happstack-server-0.5.0 (new package) happstack-0.5.0 (new package) mpiechotka@localhost ~ % cabal install happstack --constraint 'parsec >= 3' -v --dry-run /usr/bin/ghc --numeric-version looking for package tool: ghc-pkg near compiler in /usr/bin found package tool in /usr/bin/ghc-pkg /usr/bin/ghc-pkg --version /usr/bin/ghc --supported-languages Reading installed packages... /usr/bin/ghc-pkg dump --global /usr/bin/ghc-pkg dump --user /usr/bin/ghc --print-libdir Reading available packages... Resolving dependencies... selecting happstack-0.5.0 (hackage) and discarding HStringTemplate-0.2, 0.3, 0.3.1, 0.3.2, 0.4, 0.4.1, 0.4.2, happstack-0.2.1, 0.3.1, 0.3.2, 0.4.1, happstack-data-0.1, 0.2.1, 0.3.1, 0.3.2, 0.3.3, 0.4.1, happstack-ixset-0.1, 0.2.1, 0.3.1, 0.3.2, 0.4.1, happstack-server-0.1, 0.2.1, 0.3.1, 0.3.2, 0.3.3, 0.4.1, happstack-state-0.1, 0.2.1, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.4.1, happstack-util-0.1, 0.2.1, 0.3.1, 0.3.2, 0.4.1, harp-0.2.1, hsp-0.2, 0.4, 0.4.4, 0.4.5, 0.5.0, 0.5.1, hsx-0.4, 0.4.4, 0.4.5, 0.4.6, 0.4.8, 0.5.0, 0.5.1, 0.5.2, 0.5.5, 0.5.6, 0.6.0, 0.6.1 and 0.6.2 selecting happstack-data-0.5.0 (hackage) and discarding HaXml-1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.19.6, 1.19.7, 1.20, 1.20.1, 1.20.2, syb-with-class-0.1, 0.2, 0.3, 0.4, 0.5, 0.5.1, 0.6, text-0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.7.0.1, time-1.0, 1.1.2.0, 1.1.2.1, 1.1.2.2, 1.1.2.3, 1.1.2.4 and 1.1.3 selecting happstack-server-0.5.0 (hackage) and discarding sendfile-0.1, 0.2, 0.3, 0.3.1, 0.4, 0.5, utf8-string-0.1, 0.2, 0.3, 0.3.1, 0.3.1.1, 0.3.2 and 0.3.3 selecting happstack-state-0.5.0 (hackage) selecting harp-0.4 (installed or hackage) selecting hsp-0.5.2 (installed or hackage) and discarding HJScript-0.4, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8 and 0.4.9 selecting HJScript-0.5.0 (installed or hackage) and discarding HJavaScript-0.4, 0.4.4 and 0.4.5 selecting hsx-0.7.0 (installed or hackage) and discarding haskell-src-exts-0.2.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.7, 0.3.9, 0.3.10, 0.3.11, 0.3.12, 0.4.1, 0.4.2, 0.4.3, 0.4.3.1, 0.4.4, 0.4.4.1, 0.4.5, 0.4.6, 0.4.8, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.3, 1.1.3.1, 1.1.4, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5 and 1.4.0 selecting sendfile-0.6.1 (hackage) selecting syb-with-class-0.6.1 (installed or hackage) and discarding template-haskell-2.2.0.0, 2.3.0.0 and 2.3.0.1 selecting syb-with-class-instances-text-0.0.1 (installed or hackage) selecting text-0.7.1.0 (installed or hackage) and discarding deepseq-1.0.0.0 selecting deepseq-1.1.0.0 (installed or hackage) and discarding array-0.1.0.0, containers-0.1.0.0 and 0.1.0.1 selecting ghc-prim-0.2.0.0 (installed) selecting ffi-1.0 (installed) selecting rts-1.0 (installed) selecting zlib-0.5.2.0 (installed or hackage) and discarding zlib-0.2, 0.3, 0.4, 0.4.0.1, 0.4.0.2, 0.4.0.3, 0.4.0.4 and 0.5.0.0 selecting html-1.0.1.2 (installed or hackage) and discarding html-1.0 and 1.0.1.1 selecting xhtml-3000.2.0.1 (installed or hackage) and discarding xhtml-3000.0.0, 3000.0.1, 3000.0.2.1, 3000.0.2.2, 3000.1.0.0 and 3000.2.0.0 selecting stm-2.1.1.2 (installed or hackage) and discarding stm-2.1, 2.1.1.0 and 2.1.2.0 selecting happstack-ixset-0.5.0.1 (hackage) and discarding happstack-ixset-0.5.0 selecting happstack-util-0.5.0.1 (installed or hackage) and discarding SMTPClient-0.1, 0.2, 0.3, 1.0, 1.0.1, happstack-util-0.5.0, network-2.0 and 2.1.0.0 selecting SMTPClient-1.0.2 (installed or hackage) and discarding hsemail-1.0, 1.1, 1.2, 1.3, 1.4 and 1.5 selecting hsemail-1.6 (installed or hackage) selecting unix-compat-0.1.2.1 (installed or hackage) and discarding unix-compat-0.1, 0.1.1 and 0.1.2.0 selecting strict-concurrency-0.2.3 (installed or hackage) and discarding strict-concurrency-0.1, 0.2, 0.2.1 and 0.2.2 selecting hslogger-1.0.10 (installed or hackage) and discarding hslogger-1.0.2, 1.0.4, 1.0.5, 1.0.6, 1.0.7 and 1.0.9 selecting binary-0.5.0.2 (installed or hackage) and discarding binary-0.2, 0.3, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.4.3.1, 0.4.4, 0.5 and 0.5.0.1 selecting MaybeT-0.1.2 (hackage) and discarding MaybeT-0.1.0 and 0.1.1 selecting HaXml-1.13.3 (hackage) and discarding HaXml-1.13.2 selecting network-2.2.1.7 (installed or hackage) and discarding network-2.2.0.0, 2.2.0.1, 2.2.1, 2.2.1.1, 2.2.1.2, 2.2.1.3, 2.2.1.4, 2.2.1.5 and 2.2.1.6 selecting cabal: cannot configure HStringTemplate-0.6.2. It requires parsec <3 For the dependency on parsec <3 there are these packages: parsec-2.0, parsec-2.1.0.0 and parsec-2.1.0.1. However none of them are available. parsec-2.0 was excluded because of the top level dependency parsec >=3 parsec-2.1.0.0 was excluded because of the top level dependency parsec parsec-2.1.0.1 was excluded because of the top level dependency parsec
=3
And if you mean why I use it in general - I'm using parsec 3 in packages which depends on, among others, network.
If I just run: % runhaskell Setup.hs configure --user All seems to be ok but % cabal install Wants to reinstall packages (or complains about constraints).
Note that with its dependency resolution stuff, cabal-install tries to ensure you have an entire working and consistent set of dependencies, whereas doing it manually will happily break everything.
It is not a missing dependency. It is that the cabal-install tries to use dependencies from hackage instead of installed packages.
Not quite: if its already installed and working, cabal-install will use it; if there is some inconsistency (e.g. package Foo was built against Bar-x but you now have Bar-y installed) then cabal-install will try rebuilding that package; note that if you installed it from a local edited repository then cabal-install doesn't know this and will get the official hackage version.
Everything is working. Not rebuilding HStringTemplate/happstack-utils would perfectly work as they are build against parsec 3 and etc. % ghc-pkg check % It tries to install it regardless of if it is broken or not.
Also, I note that you seem to use the Gentoo Haskell overlay (as you've made bug reports about it) but you're also building packages by hand; this can also lead to problems (don't mix your packages kids!).
Possibly but: - I'd like to have gtk2hs, haskell-platform and ghc on system level instead of compiling it on my own. With exception of darcs i'm not using anything else from there. - Haskell overlay don't have all packages I need sufficiently fast. Well - it don't have everything I need in the first place. Regards

Maciej Piechotka
Also, I note that you seem to use the Gentoo Haskell overlay (as you've made bug reports about it) but you're also building packages by hand; this can also lead to problems (don't mix your packages kids!).
Possibly but: - I'd like to have gtk2hs, haskell-platform and ghc on system level instead of compiling it on my own. With exception of darcs i'm not using anything else from there. - Haskell overlay don't have all packages I need sufficiently fast. Well - it don't have everything I need in the first place.
Well, we only update and include packages that _we_ know about and use; if a package is out of date or you want a new one, pop in to #gentoo-haskell and ask use. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

Maciej Piechotka schrieb:
On Wed, 2010-05-05 at 01:09 +0200, Daniel Fischer wrote:
On Mittwoch 05 Mai 2010 00:55:38, Maciej Piechotka wrote:
I try to configure happstack with parsec 3.1. It seems to fail due to cabal:
happstack-util.cabal says parsec < 3, so --constraint="parsec > 3" and the given dependencies are incompatible, hence it can't be configured.
Probably parsec < 3 was specified because parsec-3.0 was significantly slower than parsec-2.*.
I updated local copy, as shown, but cabal wants to rebuild it anyway. My question was rather why the repo is considered at all when the package is installed.
Surprisingly using plain Cabal (runhaskell Setup configure; runhaskell Setup build; runhaskell Setup install) often works in these cases. Cabal-install is somehow too clever and if it cannot resolve the dependencies it thinks this must be impossible. If it finds a package, that it could not have installed by itself, it tries to install it by itself. First I thought that this due to cabal-install trying to find appropriate flag assignments by itself. However, Duncan Coutts told me that plain Cabal tries this as well. I have no idea, what the key difference between cabal-install and plain Cabal is.

On Wednesday 05 May 2010 15:45:38, Henning Thielemann wrote:
Maciej Piechotka schrieb:
On Wed, 2010-05-05 at 01:09 +0200, Daniel Fischer wrote:
On Mittwoch 05 Mai 2010 00:55:38, Maciej Piechotka wrote:
I try to configure happstack with parsec 3.1. It seems to fail due to cabal:
happstack-util.cabal says parsec < 3, so --constraint="parsec > 3" and the given dependencies are incompatible, hence it can't be configured.
Probably parsec < 3 was specified because parsec-3.0 was significantly slower than parsec-2.*.
I updated local copy, as shown, but cabal wants to rebuild it anyway. My question was rather why the repo is considered at all when the package is installed.
Maciej, if you need to edit further .cabal files, you could make a minor- minor version bump, x.y.z -> x.y.z.1 e.g., maybe that would convince cabal- install not to reinstall.
Surprisingly using plain Cabal (runhaskell Setup configure; runhaskell Setup build; runhaskell Setup install) often works in these cases.
That's not surprising. runhaskell ./Setup.hs configure can only go by what the .cabal file in the current directory and ghc-pkg say. If you edit the .cabal file to install e.g. happstack-util-0.5.0 with parsec-3, the changed .cabal file and the ghc-pkg output are consistent, so Cabal sees no reason to reinstall. cabal-install presumably looks at the downloaded index from Hackage (it must recursively follow the dependencies to see which of them must be installed before [and in which order]). The happstack-util .cabal file there says parsec < 3. But ghc-pkg says - there is no parsec < 3 installed or - happstack-util-0.5.0 was built with parsec-3.* (don't know which check comes first if both are made). That is inconsistent with what cabal-install knows from other sources, hence it assumes it's broken.
Cabal-install is somehow too clever and if it cannot resolve the dependencies it thinks this must be impossible. If it finds a package, that it could not have installed by itself, it tries to install it by itself.
First I thought that this due to cabal-install trying to find appropriate flag assignments by itself. However, Duncan Coutts told me that plain Cabal tries this as well. I have no idea, what the key difference between cabal-install and plain Cabal is.

Daniel Fischer schrieb:
On Wednesday 05 May 2010 15:45:38, Henning Thielemann wrote:
Surprisingly using plain Cabal (runhaskell Setup configure; runhaskell Setup build; runhaskell Setup install) often works in these cases.
That's not surprising. runhaskell ./Setup.hs configure can only go by what the .cabal file in the current directory and ghc-pkg say. If you edit the .cabal file to install e.g. happstack-util-0.5.0 with parsec-3, the changed .cabal file and the ghc-pkg output are consistent, so Cabal sees no reason to reinstall.
cabal-install presumably looks at the downloaded index from Hackage (it must recursively follow the dependencies to see which of them must be installed before [and in which order]). The happstack-util .cabal file there says parsec < 3. But ghc-pkg says - there is no parsec < 3 installed or - happstack-util-0.5.0 was built with parsec-3.* (don't know which check comes first if both are made). That is inconsistent with what cabal-install knows from other sources, hence it assumes it's broken.
This makes sense. It would be certainly better if cabal-install would alert about the found inconsistency instead of trying to fix it. Then there might an additional cabal-install flag, that makes cabal-install prefer the output of ghc-pkg over the hackage database 00-index.tar in case of inconsistencies. Could the problem also be solved by changing the version of packages with locally modified cabal files from a.b.c.d to a.b.c.d+1 ?

Henning Thielemann
This makes sense. It would be certainly better if cabal-install would alert about the found inconsistency instead of trying to fix it. Then there might an additional cabal-install flag, that makes cabal-install prefer the output of ghc-pkg over the hackage database 00-index.tar in case of inconsistencies.
What do you mean by "prefer the output of ghc-pkg over the hackage database"? If there is a broken/invalid dependency chain, then dependencies _have_ to be rebuilt to fix it. ghc-pkg, however, doesn't say _how_ those packages where built or from where.
Could the problem also be solved by changing the version of packages with locally modified cabal files from a.b.c.d to a.b.c.d+1 ?
No, since it will always prefer the highest version, and if its the one that's broken then it will just complain that that package doens't exist and will refuse to build what you want. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

Ivan Lazar Miljenovic schrieb:
Henning Thielemann
writes: This makes sense. It would be certainly better if cabal-install would alert about the found inconsistency instead of trying to fix it. Then there might an additional cabal-install flag, that makes cabal-install prefer the output of ghc-pkg over the hackage database 00-index.tar in case of inconsistencies.
What do you mean by "prefer the output of ghc-pkg over the hackage database"? If there is a broken/invalid dependency chain, then dependencies _have_ to be rebuilt to fix it. ghc-pkg, however, doesn't say _how_ those packages where built or from where.
Could the problem also be solved by changing the version of packages with locally modified cabal files from a.b.c.d to a.b.c.d+1 ?
No, since it will always prefer the highest version, and if its the one that's broken then it will just complain that that package doens't exist and will refuse to build what you want.
I meant it the other way round: Given that package X-a.b.c.d does not compile due to dependencies that turn out to be too restricted, then I could relax the dependency version bounds in X.cabal. If I also increase X's version to a.b.c.d+1, then cabal-install should be happy.

Henning Thielemann
I meant it the other way round: Given that package X-a.b.c.d does not compile due to dependencies that turn out to be too restricted, then I could relax the dependency version bounds in X.cabal. If I also increase X's version to a.b.c.d+1, then cabal-install should be happy.
Yes, that should suffice. You'll have to build that patched version yourself though. Note that a better way of doing it is to change the version to "a.b.c.d.1", in case upstream releases an "a.b.c.d+1" version. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

Hello, Seems that happstack-util had an artificially low upper bounds. I just uploaded happstack-util 0.5.0.1 which bumps it to parsec < 4. Make sure that your version of the 'network' library is compiled against parsec 3, since happstack-server depends on both network and parsec. Thanks for your report! - jeremy On May 4, 2010, at 5:55 PM, Maciej Piechotka wrote:
I try to configure happstack with parsec 3.1. It seems to fail due to cabal:
3
I installed happstack-util editing happstack-util.cabal by hand: % grep parsec ~/.ghc/x86_64-linux-6.12.2/package.conf.d/happstack- util-0.5.0-6e27d5d3ba1c07f259d463ee3036c92b.conf parsec-3.1.0-5842597f447f82b210228391f371cff1 % cabal install --constraint 'parsec > 3' --dry-run happstack Resolving dependencies... cabal: cannot configure happstack-util-0.5.0. It requires parsec <3 For the dependency on parsec <3 there are these packages: parsec-2.0, parsec-2.1.0.0 and parsec-2.1.0.1. However none of them are available. parsec-2.0 was excluded because of the top level dependency parsec >3 parsec-2.1.0.0 was excluded because of the top level dependency parsec parsec-2.1.0.1 was excluded because of the top level dependency parsec
3 % ghc-pkg list | grep happstack-util happstack-util-0.5.0
Regards _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (6)
-
Daniel Fischer
-
Henning Thielemann
-
Ivan Lazar Miljenovic
-
Ivan Miljenovic
-
Jeremy Shaw
-
Maciej Piechotka