S3: git annex enableremote will not create a bucket name, which failed since the bucket already exists.
This commit is contained in:
parent
b3eccec68c
commit
22a4e92df7
2 changed files with 7 additions and 4 deletions
|
@ -98,9 +98,9 @@ gen r u c gc = do
|
||||||
s3Setup :: Maybe UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID)
|
s3Setup :: Maybe UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID)
|
||||||
s3Setup mu mcreds c = do
|
s3Setup mu mcreds c = do
|
||||||
u <- maybe (liftIO genUUID) return mu
|
u <- maybe (liftIO genUUID) return mu
|
||||||
s3Setup' u mcreds c
|
s3Setup' (isNothing mu) u mcreds c
|
||||||
s3Setup' :: UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID)
|
s3Setup' :: Bool -> UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID)
|
||||||
s3Setup' u mcreds c = if configIA c then archiveorg else defaulthost
|
s3Setup' new u mcreds c = if configIA c then archiveorg else defaulthost
|
||||||
where
|
where
|
||||||
remotename = fromJust (M.lookup "name" c)
|
remotename = fromJust (M.lookup "name" c)
|
||||||
defbucket = remotename ++ "-" ++ fromUUID u
|
defbucket = remotename ++ "-" ++ fromUUID u
|
||||||
|
@ -120,7 +120,8 @@ s3Setup' u mcreds c = if configIA c then archiveorg else defaulthost
|
||||||
(c', encsetup) <- encryptionSetup c
|
(c', encsetup) <- encryptionSetup c
|
||||||
c'' <- setRemoteCredPair encsetup c' (AWS.creds u) mcreds
|
c'' <- setRemoteCredPair encsetup c' (AWS.creds u) mcreds
|
||||||
let fullconfig = c'' `M.union` defaults
|
let fullconfig = c'' `M.union` defaults
|
||||||
genBucket fullconfig u
|
when new $
|
||||||
|
genBucket fullconfig u
|
||||||
use fullconfig
|
use fullconfig
|
||||||
|
|
||||||
archiveorg = do
|
archiveorg = do
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -5,6 +5,8 @@ git-annex (5.20150421) UNRELEASED; urgency=medium
|
||||||
in Debian Jessie.
|
in Debian Jessie.
|
||||||
* S3: git annex info will show additional information about a S3 remote
|
* S3: git annex info will show additional information about a S3 remote
|
||||||
(endpoint, port, storage class)
|
(endpoint, port, storage class)
|
||||||
|
* S3: git annex enableremote will not create a bucket name, which
|
||||||
|
failed since the bucket already exists.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Tue, 21 Apr 2015 15:54:10 -0400
|
-- Joey Hess <id@joeyh.name> Tue, 21 Apr 2015 15:54:10 -0400
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue