Skip to content

Commit

Permalink
Merge pull request #4185 from hvr/pr/issue-4098
Browse files Browse the repository at this point in the history
Mark `template-haskell` non-upgradable (again)
  • Loading branch information
23Skidoo authored Dec 22, 2016
2 parents 49ecb69 + 0eb4e51 commit 87b650d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 8 additions & 2 deletions cabal-install/Distribution/Client/Dependency.hs
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,14 @@ dontUpgradeNonUpgradeablePackages params =
(PackageConstraintInstalled pkgname)
ConstraintSourceNonUpgradeablePackage
| Set.notMember (mkPackageName "base") (depResolverTargets params)
, pkgname <- map mkPackageName [ "base", "ghc-prim", "integer-gmp"
, "integer-simple" ]
-- If you change this enumeration, make sure to update the list in
-- "Distribution.Solver.Modular.Solver" as well
, pkgname <- [ mkPackageName "base"
, mkPackageName "ghc-prim"
, mkPackageName "integer-gmp"
, mkPackageName "integer-simple"
, mkPackageName "template-haskell"
]
, isInstalled pkgname ]

isInstalled = not . null
Expand Down
5 changes: 4 additions & 1 deletion cabal-install/Distribution/Solver/Modular/Solver.hs
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,14 @@ solve sc cinfo idx pkgConfigDB userPrefs userConstraints userGoals =
validateLinking idx .
validateTree cinfo idx pkgConfigDB
prunePhase = (if asBool (avoidReinstalls sc) then P.avoidReinstalls (const True) else id) .
-- packages that can never be "upgraded":
-- packages that can never be "upgraded"
-- If you change this enumeration, make sure to update the list in
-- "Distribution.Client.Dependency" as well
P.requireInstalled (`elem` [ mkPackageName "base"
, mkPackageName "ghc-prim"
, mkPackageName "integer-gmp"
, mkPackageName "integer-simple"
, mkPackageName "template-haskell"
])
buildPhase = traceTree "build.json" id
$ buildTree idx (independentGoals sc) (S.toList userGoals)
Expand Down

0 comments on commit 87b650d

Please sign in to comment.