Skip to content
This repository was archived by the owner on Feb 3, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions hptool/src/Package.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ packageRules = do

packageDepsFile PackageWildCard %> \depFile -> do
hpRel <- askHpRelease
installAction depFile hpRel
bc <- askBuildConfig
installAction depFile (bcIncludeExtra bc) hpRel

listBuild %> \out -> do
hpRel <- askHpRelease
Expand All @@ -64,8 +65,8 @@ packageRules = do
-- components come out closer to normal sort order. Go figure!


installAction :: FilePath -> Release -> Action ()
installAction depFile hpRel = do
installAction :: FilePath -> Bool -> Release -> Action ()
installAction depFile incExtras hpRel = do
let pkg = extractPackage depFile
let srcDir = packageSourceDir pkg
need [ dir srcDir ]
Expand All @@ -89,7 +90,7 @@ installAction depFile hpRel = do

constraints =
map (\p -> pkgName p ++ "==" ++ showVersion (pkgVersion p)) $
(allPackages True) hpRel
(allPackages incExtras) hpRel

decode out = case drop 1 $ lines out of
("All the requested packages are already installed:":_) ->
Expand All @@ -105,4 +106,4 @@ installAction depFile hpRel = do
++ unwords (filter (not . (`elem` packages)) deps) ++ "\n" ++ "Could not build " ++ depFile
_ -> Left out

packages = map show $ (allPackages True) hpRel --note should be False if minimal...
packages = map show $ (allPackages incExtras) hpRel