[commit: Cabal] master: Reactivate output of changes for reinstalled pkgs in install plan (1be3fab)
Ian Lynagh
igloo at earth.li
Fri Nov 4 18:06:02 CET 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/1be3fabc1386b0a738fec5e7c241515e1aa2a090
>---------------------------------------------------------------
commit 1be3fabc1386b0a738fec5e7c241515e1aa2a090
Author: Andres Loeh <andres at well-typed.com>
Date: Sun Jun 19 16:35:20 2011 +0000
Reactivate output of changes for reinstalled pkgs in install plan
>---------------------------------------------------------------
cabal-install/Distribution/Client/Install.hs | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/cabal-install/Distribution/Client/Install.hs b/cabal-install/Distribution/Client/Install.hs
index 1cf1859..25505de 100644
--- a/cabal-install/Distribution/Client/Install.hs
+++ b/cabal-install/Distribution/Client/Install.hs
@@ -21,7 +21,7 @@ module Distribution.Client.Install (
import Data.List
( unfoldr, find, nub, sort )
import Data.Maybe
- ( isJust, fromMaybe )
+ ( isJust, fromMaybe, maybeToList )
import Control.Exception as Exception
( handleJust )
#if MIN_VERSION_base(4,0,0)
@@ -371,11 +371,14 @@ printDryRun verbosity installedPkgIndex plan = case unfoldr next plan of
[] -> ""
diff -> " changes: " ++ intercalate ", " diff
changes :: Installed.InstalledPackageInfo -> ConfiguredPackage -> [String]
- changes _ _ = []
-{-
changes pkg pkg' = map change . filter changed
$ mergeBy (comparing packageName)
- (nub . sort . depends $ pkg)
+ -- get dependencies of installed package (convert to source pkg ids via index)
+ (nub . sort . concatMap (maybeToList .
+ fmap Installed.sourcePackageId .
+ PackageIndex.lookupInstalledPackageId installedPkgIndex) .
+ Installed.depends $ pkg)
+ -- get dependencies of configured package
(nub . sort . depends $ pkg')
change (OnlyInLeft pkgid) = display pkgid ++ " removed"
change (InBoth pkgid pkgid') = display pkgid ++ " -> "
@@ -383,7 +386,6 @@ printDryRun verbosity installedPkgIndex plan = case unfoldr next plan of
change (OnlyInRight pkgid') = display pkgid' ++ " added"
changed (InBoth pkgid pkgid') = pkgid /= pkgid'
changed _ = True
--}
-- ------------------------------------------------------------
-- * Post installation stuff
More information about the Cvs-libraries
mailing list