Skip to content
Browse files

Merge.hs: cleanup: renamed 'commandFlags' to 'common_fas'

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information...
1 parent 4c3b979 commit 70a5c0d8cfe3ac927feeabe55941589f12c4a360 @trofi trofi committed Dec 30, 2013
Showing with 5 additions and 5 deletions.
  1. +5 −5 Merge.hs
View
10 Merge.hs
@@ -222,17 +222,17 @@ mergeGenericPackageDescription verbosity overlayPath cat pkgGenericDesc fetch =
Nothing -> x:(updateFa xs y)
Just y' -> (fst x,y'):(updateFa xs y)
-- then remove all flags that can't be changed
- commonFlags = L.foldl1' L.intersect $ map fst deps1
- all_flags' | null commonFlags = all_flags
- | otherwise = filter (\a -> all (a/=) $ map fst commonFlags) all_flags
+ 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
-- flags that are failed to resolve
deadFlags = filter (\x -> all (x/=) $ map fst deps1) all_possible_flag_assignments
-- and finally prettify all deps:
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/=) commonFlags))) deps
+ map (first (filter (\x -> all (x/=) common_fas))) deps
tdeps :: Merge.EDep
tdeps = (L.foldl' (\x y -> x `mappend` (snd y)) mempty deps1){
@@ -347,7 +347,7 @@ mergeGenericPackageDescription verbosity overlayPath cat pkgGenericDesc fetch =
notice verbosity $ "Skipped depends: " ++ show (map display skipped_deps)
notice verbosity $ "Dropped depends: " ++ show (map display dropped_deps)
notice verbosity $ "Dead flags: " ++ show (map pp_fa deadFlags)
- notice verbosity $ "Dropped flags: " ++ show (map (unFlagName.fst) commonFlags)
+ notice verbosity $ "Dropped flags: " ++ show (map (unFlagName.fst) common_fas)
-- mapM_ print tdeps
forM_ ghc_packages $

0 comments on commit 70a5c0d

Please sign in to comment.
Something went wrong with that request. Please try again.