fix build with older aws

S3: Multipart uploads are now only supported when git-annex is built
with aws-0.16.0 or later, as earlier versions of the library don't
support versioning with multipart uploads.

This will affect the android build, and debian stable also has a too old
aws to support both features at the same time.

This commit was sponsored by Nick Piper on Patreon.
This commit is contained in:
Joey Hess 2018-09-13 09:58:36 -04:00
parent 8daccbc2b3
commit 677038199c
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 4 additions and 1 deletions

View file

@ -34,6 +34,9 @@ git-annex (6.20180808) UNRELEASED; urgency=medium
* S3: Support buckets with versioning enabled. When a remote
is configured with exporttree=yes versioning=yes, git-annex can
download past versions of exported files from it.
* S3: Multipart uploads are now only supported when git-annex is built
with aws-0.16.0 or later, as earlier versions of the library don't
support versioning with multipart uploads.
* S3: Support AWS_SESSION_TOKEN.
* Don't use GIT_PREFIX when GIT_WORK_TREE=. because it seems git
does not intend GIT_WORK_TREE to be relative to GIT_PREFIX in that

View file

@ -211,7 +211,7 @@ storeHelper info h f object p = case partSize info of
r <- sendS3Handle h $ putObject info object rbody
return (mkS3VersionID object (S3.porVersionId r))
multipartupload fsz partsz = do
#if MIN_VERSION_aws(0,10,6)
#if MIN_VERSION_aws(0,16,0)
let startreq = (S3.postInitiateMultipartUpload (bucket info) object)
{ S3.imuStorageClass = Just (storageClass info)
, S3.imuMetadata = metaHeaders info