[pkg-haskell-tools] 01/04: Merge branch 'master' into short-names

Sven Bartscher svenb-guest at moszumanska.debian.org
Sat Aug 22 10:35:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

svenb-guest pushed a commit to branch short-names
in repository pkg-haskell-tools.

commit bef88f8a8b6ad8a3bc6ce410897eefd80f1fef00
Merge: 383a042 41cb90b
Author: Sven Bartscher <sven.bartscher at weltraumschlangen.de>
Date:   Wed Aug 19 20:11:43 2015 +0200

    Merge branch 'master' into short-names

 dht.cabal       |  1 +
 src/Link.hs     | 15 +++++++++++++++
 src/Utils.hs    |  5 +++++
 src/make-all.hs | 31 +++++++++++++++++++++++++------
 4 files changed, 46 insertions(+), 6 deletions(-)

diff --cc src/make-all.hs
index 028fcf8,ea83ed6..3d84767
--- a/src/make-all.hs
+++ b/src/make-all.hs
@@@ -33,9 -30,8 +33,10 @@@ import qualified Debian.Version.Common 
  import Text.Parsec hiding (option, oneOf)
  import Text.Parsec.String
  
 +import Text.PrettyPrint.HughesPJ (render)
 +
  import Utils
+ import Link
  
  -- Option parsing
  data Conf = Conf
@@@ -280,10 -254,28 +281,28 @@@ main = d
         <> progDesc "Rebuilds a set of packages"
         <> header "make-all - Rebuilds a set of packages" )
  
 -    run conf = testBindMount conf $ shake (makeShakeOptions conf) (shakeMain conf)
 -
 +    run conf = do
 +         packages <- System.Directory.getDirectoryContents "p"
-          shake (makeShakeOptions conf) (shakeMain conf packages)
++         testBindMount conf $ shake (makeShakeOptions conf) (shakeMain conf packages)
+ 
+ testBindMount :: Conf -> IO () -> IO ()
+ testBindMount (Conf {..}) act = do
+     -- Test if the bindmount directory works
+     withTempDirIO bindMountDir $ \tmpdir -> do
+         Exit c <- cmd ["schroot", "-d", "/", "-c", schrootName, "--", "test", "-d", tmpdir]
+         if (c == ExitSuccess)
+         then act
+         else putStrLn $ unlines
+             [ "Inside the schroot " ++ schrootName ++", the directory " ++ bindMountDir
+             , "is not available. Please configure the schroot to bindmount this directory"
+             , "(e.g. in /etc/schroot/default/fstab), or choose a different directory using"
+             , "the --bindmount parameter."
+             , ""
+             , "For best performance, choose a directory on a tmpfs file system or"
+             , "the same partition as --output (currently " ++ targetDir ++ ")."
+             , "Actually, the latter optimization is not yet implemented...."
+             ]
  
 -
  makeShakeOptions :: Conf -> ShakeOptions
  makeShakeOptions Conf{..} = shakeOptions
      { shakeFiles = targetDir </> ".shake"

-- 
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