summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-05-31 23:15:40 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-05-31 23:15:40 -0400
commit2183fd2abd95b6deaa9baef47e2f9c5f865123e1 (patch)
treead1ed21da1ba472bfe441401291932bd1ba378eb
parentf5de183c7168627e9bd969aa48f8215f411bc507 (diff)
Require that the SHA256 backend can be used when building, since it's the default.
-rw-r--r--Backend/SHA.hs2
-rw-r--r--Build/Configure.hs9
-rw-r--r--debian/changelog2
3 files changed, 8 insertions, 5 deletions
diff --git a/Backend/SHA.hs b/Backend/SHA.hs
index 3adac65d8..c2a6cf976 100644
--- a/Backend/SHA.hs
+++ b/Backend/SHA.hs
@@ -45,7 +45,7 @@ genBackendE size =
shaCommand :: SHASize -> Maybe String
shaCommand 1 = SysConfig.sha1
-shaCommand 256 = SysConfig.sha256
+shaCommand 256 = Just SysConfig.sha256
shaCommand 224 = SysConfig.sha224
shaCommand 384 = SysConfig.sha384
shaCommand 512 = SysConfig.sha512
diff --git a/Build/Configure.hs b/Build/Configure.hs
index 341b8840d..86a347924 100644
--- a/Build/Configure.hs
+++ b/Build/Configure.hs
@@ -26,15 +26,16 @@ tests =
, TestCase "bup" $ testCmd "bup" "bup --version >/dev/null"
, TestCase "gpg" $ testCmd "gpg" "gpg --version >/dev/null"
, TestCase "ssh connection caching" getSshConnectionCaching
- ] ++ shaTestCases [1, 256, 512, 224, 384]
+ ] ++ shaTestCases False [1, 512, 224, 384] ++ shaTestCases True [256]
-shaTestCases :: [Int] -> [TestCase]
-shaTestCases l = map make l
+shaTestCases :: Bool -> [Int] -> [TestCase]
+shaTestCases required l = map make l
where make n =
let
cmds = map (\x -> "sha" ++ show n ++ x) ["", "sum"]
key = "sha" ++ show n
- in TestCase key $ maybeSelectCmd key cmds "</dev/null"
+ selector = if required then selectCmd else maybeSelectCmd
+ in TestCase key $ selector key cmds "</dev/null"
tmpDir :: String
tmpDir = "tmp"
diff --git a/debian/changelog b/debian/changelog
index 61290b1aa..52f6c3b97 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ git-annex (3.20120523) UNRELEASED; urgency=low
and adds them.
* Fix display of warning message when encountering a file that uses an
unsupported backend.
+ * Require that the SHA256 backend can be used when building, since it's the
+ default.
-- Joey Hess <joeyh@debian.org> Sun, 27 May 2012 20:55:29 -0400