diff options
author | Joey Hess <joey@kitenet.net> | 2014-03-27 14:30:36 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-03-27 14:30:36 -0400 |
commit | 3c85f6754a1c4dfdc5860dd0b3e599df5998bab2 (patch) | |
tree | 166a7dadc808ddb03f8cf368e5417dd798edc802 /Remote | |
parent | 1467cc05ee8e88316037c1be117a32813acc0675 (diff) |
Fix glacier repo creation bug
Version 5.20140227 broke creation of glacier repositories, not including
the datacenter and vault in their configuration. This bug is fixed, but
glacier repositories set up with the broken version of git-annex need to
have the datacenter and vault set in order to be usable. This can be done
using git annex enableremote to add the missing settings. For details, see
http://git-annex.branchable.com/bugs/problems_with_glacier/
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Glacier.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Remote/Glacier.hs b/Remote/Glacier.hs index fe6f53a77..eb274714b 100644 --- a/Remote/Glacier.hs +++ b/Remote/Glacier.hs @@ -82,7 +82,7 @@ glacierSetup' enabling u c = do unless enabling $ genVault fullconfig u gitConfigSpecialRemote u fullconfig "glacier" "true" - return (c', u) + return (fullconfig, u) where remotename = fromJust (M.lookup "name" c) defvault = remotename ++ "-" ++ fromUUID u @@ -225,7 +225,8 @@ glacierParams :: RemoteConfig -> [CommandParam] -> [CommandParam] glacierParams c params = datacenter:params where datacenter = Param $ "--region=" ++ - fromJust (M.lookup "datacenter" c) + fromMaybe (error "Missing datacenter configuration") + (M.lookup "datacenter" c) glacierEnv :: RemoteConfig -> UUID -> Annex (Maybe [(String, String)]) glacierEnv c u = go =<< getRemoteCredPairFor "glacier" c creds @@ -239,7 +240,8 @@ glacierEnv c u = go =<< getRemoteCredPairFor "glacier" c creds (uk, pk) = credPairEnvironment creds getVault :: RemoteConfig -> Vault -getVault = fromJust . M.lookup "vault" +getVault = fromMaybe (error "Missing vault configuration") + . M.lookup "vault" archive :: Remote -> Key -> Archive archive r k = fileprefix ++ key2file k |