summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Remote.hs14
-rw-r--r--Remote/S3real.hs6
-rw-r--r--Remote/S3stub.hs10
-rw-r--r--debian/changelog1
4 files changed, 13 insertions, 18 deletions
diff --git a/Remote.hs b/Remote.hs
index 8046175d2..8dd80d419 100644
--- a/Remote.hs
+++ b/Remote.hs
@@ -55,14 +55,14 @@ import qualified Remote.Web
import qualified Remote.Hook
remoteTypes :: [RemoteType]
-remoteTypes =
- [ Remote.Git.remote
+remoteTypes = catMaybes
+ [ Just Remote.Git.remote
, Remote.S3.remote
- , Remote.Bup.remote
- , Remote.Directory.remote
- , Remote.Rsync.remote
- , Remote.Web.remote
- , Remote.Hook.remote
+ , Just Remote.Bup.remote
+ , Just Remote.Directory.remote
+ , Just Remote.Rsync.remote
+ , Just Remote.Web.remote
+ , Just Remote.Hook.remote
]
{- Builds a list of all available Remotes.
diff --git a/Remote/S3real.hs b/Remote/S3real.hs
index bef89b553..96a831e34 100644
--- a/Remote/S3real.hs
+++ b/Remote/S3real.hs
@@ -28,8 +28,8 @@ import Crypto
import Annex.Content
import Utility.Base64
-remote :: RemoteType
-remote = RemoteType {
+remote :: Maybe RemoteType
+remote = Just $ RemoteType {
typename = "S3",
enumerate = findSpecialRemotes "s3",
generate = gen,
@@ -58,7 +58,7 @@ gen' r u c cst =
hasKeyCheap = False,
config = c,
repo = r,
- remotetype = remote
+ remotetype = fromJust remote
}
s3Setup :: UUID -> RemoteConfig -> Annex RemoteConfig
diff --git a/Remote/S3stub.hs b/Remote/S3stub.hs
index 31e8a339e..5bd2b1c79 100644
--- a/Remote/S3stub.hs
+++ b/Remote/S3stub.hs
@@ -1,13 +1,7 @@
-- stub for when hS3 is not available
module Remote.S3 (remote) where
-import Types.Remote
import Types
-remote :: RemoteType
-remote = RemoteType {
- typename = "S3",
- enumerate = return [],
- generate = error "S3 not enabled",
- setup = error "S3 not enabled"
-}
+remote :: Maybe RemoteType
+remote = Nothing
diff --git a/debian/changelog b/debian/changelog
index e5687aac1..ac6e9b80c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
git-annex (3.20120106) UNRELEASED; urgency=low
* Support unescaped repository urls, like git does.
+ * Don't list S3 as a remote type when built without S3 support.
-- Joey Hess <joeyh@debian.org> Thu, 05 Jan 2012 14:29:30 -0400