[pkg-haskell-tools] 01/02: Fix runtime dependency resolution for bootstrapping packages.
Sven Bartscher
svenb-guest at moszumanska.debian.org
Fri Aug 21 16:18:37 UTC 2015
This is an automated email from the git hooks/post-receive script.
svenb-guest pushed a commit to branch master
in repository pkg-haskell-tools.
commit b470054de7f3444ac365a6d99e5cc116589aa68c
Author: Sven Bartscher <sven.bartscher at weltraumschlangen.de>
Date: Fri Aug 21 18:17:40 2015 +0200
Fix runtime dependency resolution for bootstrapping packages.
---
src/make-all.hs | 32 +++++++++++++++++---------------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/src/make-all.hs b/src/make-all.hs
index 960da5c..e0dba62 100644
--- a/src/make-all.hs
+++ b/src/make-all.hs
@@ -269,20 +269,22 @@ newtype GetArch = GetArch () deriving (Show,Typeable,Eq,Hashable,Binary,NFData)
-- and might not be built yet.
-- Finding library packages isn't necessary, because they were already
-- built as a build-dependency.
-extendBuildDepends :: FilePath -> (String -> Action (Maybe String)) -> [String] -> Action [String]
-extendBuildDepends targetDir binToDeb buildDeps = (buildDeps ++) <$> concat <$> mapM ourDepends buildDeps
- where ourDepends dep = do
- let debFile = targetDir </> dep
- need [debFile]
- Stdout depList <- cmd [ "dpkg-deb"
- , "--field"
- , debFile
- , "Depends"
- ]
- let depPkgs = map cleanDep $ splitOn "," depList
- depends <- catMaybes <$> mapM binToDeb depPkgs
- recursive <- extendBuildDepends targetDir binToDeb depends
- return $ depends ++ recursive
+extendBuildDepends :: FilePath -> (String -> Action (Maybe String)) -> [String] -> [String] -> Action [String]
+extendBuildDepends targetDir binToDeb ourBins buildDeps = (buildDeps ++) <$> concat <$> mapM ourDepends buildDeps
+ where ourDepends dep = if dep `notElem` ourBins
+ then do
+ let debFile = targetDir </> dep
+ need [debFile]
+ Stdout depList <- cmd [ "dpkg-deb"
+ , "--field"
+ , debFile
+ , "Depends"
+ ]
+ let depPkgs = map cleanDep $ splitOn "," depList
+ depends <- catMaybes <$> mapM binToDeb depPkgs
+ recursive <- extendBuildDepends targetDir binToDeb ourBins depends
+ return $ depends ++ recursive
+ else return []
cleanDep = takeWhile (not . isSpace) . dropWhile isSpace
manpage :: String
@@ -473,7 +475,7 @@ shakeMain conf@(Conf {..}) = do
ourBins <- readFileLines $ targetDir </> "cache" </> "binaries" </> source <.> "txt"
- depFileNames' <- extendBuildDepends targetDir binToDeb depFileNames
+ depFileNames' <- extendBuildDepends targetDir binToDeb ourBins depFileNames
putLoud $ "# recursive dependencies: " ++ intercalate "," depFileNames'
-- For the sake of packages like alex, uuagc etc, we exclude ourselves
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/pkg-haskell-tools.git
More information about the Pkg-haskell-commits
mailing list