File tree 1 file changed +8
-5
lines changed 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -122,18 +122,21 @@ bfs plan unit0 = do
122
122
-- nub and sort
123
123
reverse $ Set. toList $ Set. fromList $ concat t
124
124
125
- for uids $ \ uid -> do
126
- unit <- lookupUnit units uid
125
+ units <- for uids $ \ uid -> do
126
+ unit <- lookupUnit ( P. pjUnits plan) uid
127
127
case Map. toList (P. uComps unit) of
128
128
[(_, compinfo)] -> checkExeDeps uid (P. pjUnits plan) (P. ciExeDeps compinfo)
129
129
_ -> die $ " Unit with multiple components " ++ show uid
130
130
return unit
131
131
132
+ -- Remove non-exe copies of cabal-install. Otherwise, cabal-install
133
+ -- may appear as cabal-install:lib before dependencies of
134
+ -- cabal-install:exe:cabal, and the bootstrap build tries to build
135
+ -- all of cabal-install before those dependencies.
136
+ return $ filter (\ u -> P. uId u == P. uId unit0 || P. uPId u /= P. uPId unit0) units
132
137
where
133
138
am :: Map. Map P. UnitId (Set. Set P. UnitId )
134
- am = fmap (foldMap P. ciLibDeps . P. uComps) units
135
-
136
- units = P. pjUnits plan
139
+ am = fmap (foldMap P. ciLibDeps . P. uComps) (P. pjUnits plan)
137
140
138
141
checkExeDeps :: P. UnitId -> Map. Map P. UnitId P. Unit -> Set. Set P. UnitId -> IO ()
139
142
checkExeDeps pkgUid units = traverse_ check . Set. toList where
You can’t perform that action at this time.
0 commit comments