Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge.hs: cleanup: factor out flag cleaning to 'leave_only_dynamic_fa…

…s' helper

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information...
commit cce9ee239c64aa91e9d0e2e7b282f9efaf45742b 1 parent 35aa5e4
@trofi trofi authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 Merge.hs
View
5 Merge.hs
@@ -229,10 +229,13 @@ mergeGenericPackageDescription verbosity overlayPath cat pkgGenericDesc fetch =
-- flags that are failed to resolve
deadFlags = filter (\x -> all (x/=) $ map fst deps1) all_possible_flag_assignments
-- and finally prettify all deps:
+ leave_only_dynamic_fas :: Cabal.FlagAssignment -> Cabal.FlagAssignment
+ leave_only_dynamic_fas = filter (\fa -> all (fa /=) common_fas)
+
optimize_fa_depends :: [([(Cabal.FlagName, Bool)], [Portage.Dependency])] -> [Portage.Dependency]
optimize_fa_depends deps = Portage.sortDeps
. simplify $ map (\x -> (x,[])) $
- map (first (filter (\x -> all (x/=) common_fas))) deps
+ map (first leave_only_dynamic_fas) deps
tdeps :: Merge.EDep
tdeps = (L.foldl' (\x y -> x `mappend` (snd y)) mempty deps1){
Please sign in to comment.
Something went wrong with that request. Please try again.