[commit: Cabal] master: Disable the upgrade command for now. (91adfee)
Ian Lynagh
igloo at earth.li
Fri Jun 24 02:02:55 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/91adfee1d8722f84b6453a0afba951ff0533ee87
>---------------------------------------------------------------
commit 91adfee1d8722f84b6453a0afba951ff0533ee87
Author: Duncan Coutts <duncan at haskell.org>
Date: Wed Feb 18 22:17:52 2009 +0000
Disable the upgrade command for now.
>---------------------------------------------------------------
cabal-install/Distribution/Client/Install.hs | 31 +++++++++++++++++--------
1 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/cabal-install/Distribution/Client/Install.hs b/cabal-install/Distribution/Client/Install.hs
index ecad779..4749202 100644
--- a/cabal-install/Distribution/Client/Install.hs
+++ b/cabal-install/Distribution/Client/Install.hs
@@ -354,18 +354,29 @@ planRepoPackages defaultPref comp configFlags configExFlags installFlags
[ name | UnresolvedDependency (Dependency name _) _ <- pkgs ]
planUpgradePackages :: Compiler -> ConfigFlags -> ConfigExFlags -> Planner
-planUpgradePackages comp configFlags configExFlags (Just installed)
- (AvailablePackageDb available availablePrefs) = return $
- resolveDependenciesWithProgress buildPlatform (compilerId comp)
- (Just installed) available preferences constraints targets
+planUpgradePackages _comp _configFlags _configExFlags (Just installed)
+ (AvailablePackageDb available _availablePrefs) = die $
+ "the 'upgrade' command (when used without any package arguments) has "
+ ++ "been disabled in this release. It has been disabled because it has "
+ ++ "frequently led people to accidentally break their set of installed "
+ ++ "packages. It will be re-enabled when it is safer to use.\n"
+ ++ "Below is the list of packages that it would have tried to upgrade. You "
+ ++ "can use the 'install' command to install the ones you want. Note that "
+ ++ "it is generally not recommended to upgrade core packages.\n"
+ ++ unlines [ display pkgid | Dependency pkgid _ <- deps ]
+
+--TODO: improve upgrade so we can re-enable it
+-- return $
+-- resolveDependenciesWithProgress buildPlatform (compilerId comp)
+-- (Just installed) available preferences constraints targets
where
deps = upgradableDependencies installed available
- preferences = mergePackagePrefs PreferAllLatest availablePrefs configExFlags
- constraints = [ PackageVersionConstraint name ver
- | Dependency name ver <- deps ]
- ++ [ PackageVersionConstraint name ver
- | Dependency name ver <- configConstraints configFlags ]
- targets = [ name | Dependency name _ <- deps ]
+-- preferences = mergePackagePrefs PreferAllLatest availablePrefs configExFlags
+-- constraints = [ PackageVersionConstraint name ver
+-- | Dependency name ver <- deps ]
+-- ++ [ PackageVersionConstraint name ver
+-- | Dependency name ver <- configConstraints configFlags ]
+-- targets = [ name | Dependency name _ <- deps ]
planUpgradePackages comp _ _ _ _ =
die $ display (compilerId comp)
More information about the Cvs-libraries
mailing list