On Fri, Apr 24, 2015 at 02:51:08PM +0100, SP wrote: > On 24/04/15 13:04, Magnus Therning wrote: > > If I re-install ghc all information about installed packages is > > lost, on the ghc-level [..] When re-installing ghc these two > > databases aren't in sync anymore and using `pacman` to install > > results in errors on the `ghc-pkg` level. Basically, `pacman` won't > > re-install all dependencies, since they are already installed, but > > when registering with `ghc-pkg` it has no records of those > > dependencies. > > Can we protect the system from such mistakes? I guess the ideal > solution would be to rsync the databases somehow after ghc is > reinstalled.
The only solution I can see is to do something clever in the ghc.install (`pre_upgrade` and `post_upgrade`). I'm not sure exactly what information is available though. One would probably need enough information to distinguish a re-install from an upgrade. I should add that you are the very first one ever to report this problem. Also, I'm still not clear on *why* `pacman` all of a sudden decides to re-install ghc on your system. If you figure out why, then that might very well be a more natural place to fix the issue than inside the ghc package. (I'm guessing random re-installs can happen for other packages on your system, though not with such disastrous effects.) /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus Unix is the answer, but only if you phrase the question very carefully. -- Unknown
pgpH3QIL9batd.pgp
Description: PGP signature
_______________________________________________ arch-haskell mailing list arch-haskell@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/arch-haskell