patch applied (cabal): Put a header in the dist/setup-config file and check it on loading

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Mon Mar 3 16:51:44 EST 2008


Mon Mar  3 12:28:55 PST 2008  Duncan Coutts <duncan at haskell.org>
  * Put a header in the dist/setup-config file and check it on loading
  This should fix ticket #120 in future which is the problem where you do
  something like "sudo runghc Setup install" and you accidentally end up
  using a different version of the compiler or of the Cabal lib and you get
  an unhelpful error message:
  > Setup.hs: error reading ./.setup-config; run "setup configure" command?
  Well now you'll get a helpful error message:
  > setup: You need to re-run the 'configure' command. The version of Cabal
  > being used has changed (was Cabal-1.3.6, now Cabal-1.3.7).
  If the compiler version being used has changed too we get the extra helpful:
  > setup: You need to re-run the 'configure' command. The version of Cabal
  > being used has changed (was Cabal-1.3.6, now Cabal-1.3.7). Additionally
  > the compiler is different (was ghc-6.8, now ghc-6.9) which is probably
  > the cause of the problem.
  Of course this does not help for older versions of Cabal but there's not a
  lot we can do about that.

    M ./Distribution/Simple/Configure.hs -13 +78
    M ./Distribution/Simple/Utils.hs +8

View patch online:

  http://darcs.haskell.org/cabal/_darcs/patches/20080303202855-adfee-247e814fe751fb09809323d199b44055f1882978.gz



More information about the cabal-devel mailing list