Description
Here is an issue which I've been experiencing for quite a long time (since copying precompiled packages feature was merged):
transformers-compat-0.4.0.4
is in global database and in lts-3.8
snapshot database:
+zudov@x200 /tmp/empty-project $ stack exec ghc-pkg list transformers-compat --resolver lts-3.8
/usr/lib64/ghc-7.10.2/package.conf.d:
transformers-compat-0.4.0.4
/home/zudov/.stack/snapshots/x86_64-linux/lts-3.8/7.10.2/pkgdb:
transformers-compat-0.4.0.4
/tmp/empty-project/.stack-work/install/x86_64-linux/lts-3.8/7.10.2/pkgdb:
(no packages)
But it's not in nightly-2015-10-08
snapshot database:
+zudov@x200 /tmp/empty-project $ stack exec ghc-pkg list transformers-compat --resolver nightly-2015-10-08
/usr/lib64/ghc-7.10.2/package.conf.d:
transformers-compat-0.4.0.4
/home/zudov/.stack/snapshots/x86_64-linux/nightly-2015-10-08/7.10.2/pkgdb:
(no packages)
/tmp/empty-project/.stack-work/install/x86_64-linux/nightly-2015-10-08/7.10.2/pkgdb:
(no packages)
Trying to install it into nightly-2015-10-08
snapshot database would try to copy it from lts-3.8
and would fail because of the presence of that package in the global database:
+zudov@x200 /tmp/empty-project $ stack build transformers-compat --resolver nightly-2015-10-08
transformers-compat-0.4.0.4: copying precompiled package
Running /usr/bin/ghc-pkg register --no-user-package-db --package-db=/home/zudov/.stack/snapshots/x86_64-linux/nightly-2015-10-08/7.10.2/pkgdb/ --forc
e /home/zudov/.stack/snapshots/x86_64-linux/lts-3.2/7.10.2/pkgdb/transformers-compat-0.4.0.4-3ca5cbcec233c17da785d5f27705643c.conf exited with ExitFa
ilure 1
Reading package info from "/home/zudov/.stack/snapshots/x86_64-linux/lts-3.2/7.10.2/pkgdb/transformers-compat-0.4.0.4-3ca5cbcec233c17da785d5f27705643
c.conf" ... done.
transformers-compat-0.4.0.4: Warning: haddock-interfaces: /home/zudov/.stack/snapshots/x86_64-linux/lts-3.2/7.10.2/doc/transformers-compat-0.4.0.4/tr
ansformers-compat.haddock doesn't exist or isn't a file
transformers-compat-0.4.0.4: package(s) with this id already exist: transformers-compat-0.4.0.4
An output of the last command run with --verbose
It get it quite often with different packages and snapshots. If the package is in a global database the copying would fail.
So far I've been solving it by just removing the offending package from some database. A command line option which tells --do-not-perform-binary-copying
would be very helpful.