Oddity with 'cabal install' in GHC 7.4.1

Since upgrading to 7.4.1, if I 'cabal install' successfully and then 'cabal install' a second time without first doing a 'ghc-pkg unregister <package-name>', I get the following complaint: cabal: The install plan contains reinstalls which can break your GHC
installation. You can try --solver=modular for the new modular solver that chooses such reinstalls less often and also offers the --avoid-reinstalls option. You can also ghc-pkg unregister the affected packages and run ghc-pkg check to see the effect on reverse dependencies. If you know what you are doing you can use the --force-reinstalls option to override this reinstall check.
The only path I've found so far that's willing to rebuild or even say nothing needs rebuilding (when nothing does) is to 'ghc-pkg unregister' and then 'cabal install' again. I'm getting the same behavior on Red Hat 5 and Mac OS 10.6.8, both compiled from sources. Does anyone know what's going on here? -- Conal

Hi Conal.
On Sun, Feb 5, 2012 at 12:36 AM, Conal Elliott
Since upgrading to 7.4.1, if I 'cabal install' successfully and then 'cabal install' a second time without first doing a 'ghc-pkg unregister <package-name>', I get the following complaint:
[...]
The warning is intended to prevent you from breaking your system without knowing that you know that you're running a potentially dangerous cabal invocation. The --force-reinstalls flag should always make it build. If it doesn't, it's a bug. In addition, I'm planning to make the warning a little bit less aggressive before the release.
The only path I've found so far that's willing to rebuild or even say nothing needs rebuilding (when nothing does) is to 'ghc-pkg unregister' and then 'cabal install' again. I'm getting the same behavior on Red Hat 5 and Mac OS 10.6.8, both compiled from sources.
I'd be surprised if the OS matters. But as I said, I've not yet encountered a situation where it wouldn't build given --force-reinstalls. Cheers, Andres

On Sat, Feb 4, 2012 at 9:51 PM, Andres Löh
Hi Conal.
On Sun, Feb 5, 2012 at 12:36 AM, Conal Elliott
wrote: Since upgrading to 7.4.1, if I 'cabal install' successfully and then 'cabal install' a second time without first doing a 'ghc-pkg unregister <package-name>', I get the following complaint:
[...]
The warning is intended to prevent you from breaking your system without knowing that you know that you're running a potentially dangerous cabal invocation.
The --force-reinstalls flag should always make it build. If it doesn't, it's a bug.
In addition, I'm planning to make the warning a little bit less aggressive before the release.
Before the release of what? (seeing as GHC 7.4.1 has been released)
The only path I've found so far that's willing to rebuild or even say nothing needs rebuilding (when nothing does) is to 'ghc-pkg unregister' and then 'cabal install' again. I'm getting the same behavior on Red Hat 5 and Mac OS 10.6.8, both compiled from sources.
I'd be surprised if the OS matters. But as I said, I've not yet encountered a situation where it wouldn't build given --force-reinstalls.
Cheers, Andres
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries

In addition, I'm planning to make the warning a little bit less aggressive before the release.
Before the release of what? (seeing as GHC 7.4.1 has been released)
Sorry, I should have been clear. Before the release of cabal-install. The described behaviour only occurs in the current development version of cabal-install. It isn't tied directly to GHC 7.4.1. Cheers, Andres

Hi Andres,
Thanks for the reply! Note that I get this message even running 'cabal
install' a second time after changing nothing. Is that scenario an example
of what you mean by a "potentially dangerous cabal invocation"? I've been
unable to avoid this error message by any other means that (a) 'ghc-pkg
unregister <package>' or (b) '--force-reinstall'. So far,
'--solver=modular' hasn't helped. So I'm hoping for something less
aggressive. In particular, in case nothing has changed, I want 'cabal
install' to succeed (exit code 0) so that my automated build & install &
release processes will continue rather than get stopped.
Regards, - Conal
On Sat, Feb 4, 2012 at 9:51 PM, Andres Löh
Hi Conal.
On Sun, Feb 5, 2012 at 12:36 AM, Conal Elliott
wrote: Since upgrading to 7.4.1, if I 'cabal install' successfully and then 'cabal install' a second time without first doing a 'ghc-pkg unregister <package-name>', I get the following complaint:
[...]
The warning is intended to prevent you from breaking your system without knowing that you know that you're running a potentially dangerous cabal invocation.
The --force-reinstalls flag should always make it build. If it doesn't, it's a bug.
In addition, I'm planning to make the warning a little bit less aggressive before the release.
The only path I've found so far that's willing to rebuild or even say nothing needs rebuilding (when nothing does) is to 'ghc-pkg unregister' and then 'cabal install' again. I'm getting the same behavior on Red Hat 5 and Mac OS 10.6.8, both compiled from sources.
I'd be surprised if the OS matters. But as I said, I've not yet encountered a situation where it wouldn't build given --force-reinstalls.
Cheers, Andres

Hi Conal.
Thanks for the reply! Note that I get this message even running 'cabal install' a second time after changing nothing. Is that scenario an example of what you mean by a "potentially dangerous cabal invocation"?
The check currently is entirely ad-hoc. Any reinstallation of an existing package triggers the warning. There's no hash comparison.
I've been unable to avoid this error message by any other means that (a) 'ghc-pkg unregister <package>' or (b) '--force-reinstall'. So far, '--solver=modular' hasn't helped. So I'm hoping for something less aggressive. In particular, in case nothing has changed, I want 'cabal install' to succeed (exit code 0) so that my automated build & install & release processes will continue rather than get stopped.
The message appears, but building should work, with --force-reinstall and no --dry-run. Can you confirm that you've tried that? Cheers, Andres

I've been unable to avoid this error message by any other means that (a) 'ghc-pkg unregister <package>' or (b) '--force-reinstall'. So far, '--solver=modular' hasn't helped. So I'm hoping for something less aggressive. In particular, in case nothing has changed, I want 'cabal install' to succeed (exit code 0) so that my automated build & install & release processes will continue rather than get stopped.
The message appears, but building should work, with --force-reinstall and no --dry-run. Can you confirm that you've tried that?
Actually, the message should not even appear if --force-reinstalls is given. Are you using the latest development version of cabal-install from darcs? Cheers, Andres

On Sun, Feb 5, 2012 at 12:43 AM, Andres Löh
Hi Conal.
Thanks for the reply! Note that I get this message even running 'cabal install' a second time after changing nothing. Is that scenario an example of what you mean by a "potentially dangerous cabal invocation"?
The check currently is entirely ad-hoc. Any reinstallation of an existing package triggers the warning. There's no hash comparison.
I'm confused. Isn't package re-installation an extremely common thing in cabal while developing software? Do you cope by habitually adding --force-reinstall during development? Perhaps that habit is the piece missing from my mental picture.
unable to avoid this error message by any other means that (a) 'ghc-pkg unregister <package>' or (b) '--force-reinstall'. So far, '--solver=modular' hasn't helped. So I'm hoping for something less aggressive. In
I've been particular,
in case nothing has changed, I want 'cabal install' to succeed (exit code 0) so that my automated build & install & release processes will continue rather than get stopped.
The message appears, but building should work, with --force-reinstall and no --dry-run. Can you confirm that you've tried that?
Cheers, Andres
Yes, building does work for me with --force-reinstall. -- Conal
participants (3)
-
Andres Löh
-
Conal Elliott
-
Thomas DuBuisson