Permalink
Browse files

make sure that HackPort only searches for the overlay once

  • Loading branch information...
kolmodin committed Oct 5, 2005
1 parent 58f2b51 commit 400e6e2568dbad53945aa8830237bac17b110142
Showing with 8 additions and 1 deletion.
  1. +4 −0 HackPort/Action.hs
  2. +4 −1 HackPort/Main.hs
View
@@ -49,6 +49,10 @@ info str = do
getCfg :: HPAction Config
getCfg = gets config
+setPortageTree :: Maybe String -> HPAction ()
+setPortageTree mt = modify $ \hps ->
+ hps { config = (config hps) { portageTree = mt } }
+
lessIndent :: HPAction ()
lessIndent = modify $ \s -> s { indention = indention s - 1 }
View
@@ -31,7 +31,10 @@ getPortageTree :: HPAction String
getPortageTree = do
cfg <- getCfg
case portageTree cfg of
- Nothing -> getOverlay `sayDebug` ("Guessing overlay from /etc/make.conf...",\tree->"Found '"++tree++"'")
+ Nothing -> do
+ tree <- getOverlay `sayDebug` ("Guessing overlay from /etc/make.conf...",\tree->"Found '"++tree++"'")
+ setPortageTree $ Just tree
+ return tree
Just tree -> return tree
listAll :: HPAction ()

0 comments on commit 400e6e2

Please sign in to comment.