Skip to content

Commit 624b8dc

Browse files
committed
fix bug in preferences
1 parent c0c019b commit 624b8dc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cabal-install/src/Distribution/Client/ProjectPlanning.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,12 @@ planPackages verbosity comp platform solver SolverSettings{..}
10261026
. addPreferences
10271027
-- enable stanza preference unilaterally, even when the user asked to enable as well, to help hint the solver.
10281028
[ PackageStanzasPreference pkgname [minBound..maxBound]
1029-
| pkgname <- map pkgSpecifierTarget localPackages
1029+
| pkg <- localPackages
1030+
, let pkgname = pkgSpecifierTarget pkg
1031+
stanzaM = Map.findWithDefault Map.empty pkgname pkgStanzasEnable
1032+
stanzas = [ stanza | stanza <- [minBound..maxBound]
1033+
, Map.lookup stanza stanzaM /= Just False ]
1034+
, not (null stanzas)
10301035
]
10311036

10321037
. addConstraints

0 commit comments

Comments
 (0)