Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update getPaludisInfo to work with 'cave info' output.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  • Loading branch information...
commit 81c1c12da7841ab080fbf53eaaa4f43998e7cc18 1 parent 06e4335
@trofi trofi authored
Showing with 4 additions and 6 deletions.
  1. +4 −6 Portage/Host.hs
View
10 Portage/Host.hs
@@ -38,7 +38,7 @@ getInfo = fromJust `fmap`
----------
getPaludisInfo :: IO (Maybe LocalInfo)
-getPaludisInfo = fmap parsePaludisInfo <$> run_cmd "paludis --info"
+getPaludisInfo = fmap parsePaludisInfo <$> run_cmd "cave info"
parsePaludisInfo :: String -> LocalInfo
parsePaludisInfo text =
@@ -52,16 +52,14 @@ parsePaludisInfo text =
["Repository", nm] -> return (init nm)
_ -> fail "not a repository chunk"
let dict = [ (head ln, unwords (tail ln)) | ln <- map words lns ]
- location <- lookup "location:" dict
- distfiles <- lookup "distdir:" dict
+ location <- lookup "location" dict
+ distfiles <- lookup "distdir" dict
return (name, (location, distfiles))
- knownRepos = ["installed-virtuals", "virtuals", "gentoo", "installed"]
-
mkLocalInfo :: [(String, (String, String))] -> Maybe LocalInfo
mkLocalInfo repos = do
(gentooLocation, gentooDistfiles) <- lookup "gentoo" repos
- let overlays = [ loc | (name, (loc, _dist)) <- repos, name `notElem` knownRepos ]
+ let overlays = [ loc | (name, (loc, _dist)) <- repos ]
return (LocalInfo
{ distfiles_dir = gentooDistfiles
, portage_dir = gentooLocation

0 comments on commit 81c1c12

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