Permalink
Browse files

Merge.hs: give nicer names to "all_flags'" and "all_flags''"

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information...
1 parent 70a5c0d commit 35aa5e46df6ac6fe19887c51f9cabd227d4dfa4e @trofi trofi committed Dec 30, 2013
Showing with 5 additions and 5 deletions.
  1. +5 −5 Merge.hs
View
@@ -223,9 +223,9 @@ mergeGenericPackageDescription verbosity overlayPath cat pkgGenericDesc fetch =
Just y' -> (fst x,y'):(updateFa xs y)
-- then remove all flags that can't be changed
common_fas = L.foldl1' L.intersect $ map fst deps1
- all_flags' | null common_fas = all_flags
- | otherwise = filter (\a -> all (a/=) $ map fst common_fas) all_flags
- all_flags'' = filter (\x -> Cabal.flagName x `elem` all_flags') cabal_flag_descs
+ common_flags = map fst common_fas
+ active_flags = all_flags L.\\ common_flags
+ active_flag_descs = filter (\x -> Cabal.flagName x `elem` active_flags) cabal_flag_descs
-- flags that are failed to resolve
deadFlags = filter (\x -> all (x/=) $ map fst deps1) all_possible_flag_assignments
-- and finally prettify all deps:
@@ -375,8 +375,8 @@ mergeGenericPackageDescription verbosity overlayPath cat pkgGenericDesc fetch =
. (\e -> e { E.depend_extra = Merge.dep_e tdeps } )
. (\e -> e { E.rdepend = Merge.rdep tdeps} )
. (\e -> e { E.rdepend_extra = Merge.rdep_e tdeps } )
- . (\e -> e { E.src_configure = selected_flags $ L.sort $ map unFlagName all_flags' } )
- . (\e -> e { E.iuse = E.iuse e ++ map to_iuse all_flags'' })
+ . (\e -> e { E.src_configure = selected_flags $ L.sort $ map unFlagName active_flags } )
+ . (\e -> e { E.iuse = E.iuse e ++ map to_iuse active_flag_descs })
$ C2E.cabal2ebuild pkgDesc
mergeEbuild verbosity overlayPath (Portage.unCategory cat) ebuild

0 comments on commit 35aa5e4

Please sign in to comment.