fquery 0.2.2 → 0.2.3
raw patch · 2 files changed
+8/−7 lines, 2 files
Files
- Adelie/QDepend.hs +7/−6
- fquery.cabal +1/−1
Adelie/QDepend.hs view
@@ -37,13 +37,14 @@ fnProvide = provideFromCatName catname dep' :: [String] -> String -> IO ()-dep' provided fullname =- readUse fnIUse >>= readDepend fnDepend >>= puts fullname provided+dep' provided fullname = do+ readUse fnIUse >>= readDepend fnDepend >>= filterAndPuts fullname provided where fnDepend = concatPath [portageDB,fullname,"RDEPEND"] fnIUse = concatPath [portageDB,fullname,"USE"] -puts :: String -> [String] -> [Dependency] -> IO ()-puts str provided iWant = mapM_ print' perms+filterAndPuts :: String -> [String] -> [Dependency] -> IO ()+filterAndPuts str provided iWant = do+ mapM_ print' perms where perms = [ (p, w) | p <- provided, w <- iWant, w `satisfiedBy` p ] print' (_p, w) = white >> putStr (pad 32 ' ' str) >> off >>@@ -59,7 +60,7 @@ -- leave only version part without :SLOT/SUBSLOT part: -- "0.3:0/0.2.2=" -> 0.3 unslot :: String -> String-unslot = takeWhile (`notElem` ":/=")+unslot = takeWhile (`notElem` ":") cvu :: String -> String -> Ordering cvu = compareVersion `on` unslot@@ -93,5 +94,5 @@ (Blocker _) `satisfiedBy` _ = False (Any wantName) `satisfiedBy` provided =- wantName == provName+ unslot wantName == provName where provName = dropVersion provided
fquery.cabal view
@@ -1,5 +1,5 @@ Name: fquery-Version: 0.2.2+Version: 0.2.3 Author: David Wang <millimillenary@gmail.com>, Sergei Trofimovich <slyfox@inbox.ru> Maintainer: Sergei Trofimovich <slyfox@inbox.ru>