From: Simon Marlow Date: Thu, 27 Jul 2006 15:06:50 +0000 (+0000) Subject: oops, remove old packages when updating X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=be826f7c126244ba40252ed8b774c6aca8135422 oops, remove old packages when updating --- diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs index 3f8b0b3..b2f7d18 100644 --- a/utils/ghc-pkg/Main.hs +++ b/utils/ghc-pkg/Main.hs @@ -401,7 +401,8 @@ registerPackage input defines flags auto_ghci_libs update force = do let pkg = resolveDeps db_stack pkg0 validatePackageConfig pkg db_stack auto_ghci_libs update force - let new_details = snd db_to_operate_on ++ [pkg] + let new_details = filter not_this (snd db_to_operate_on) ++ [pkg] + not_this p = package p /= package pkg savePackageConfig db_filename maybeRestoreOldConfig db_filename $ writeNewConfig db_filename new_details