sync --content: Fix dropping unwanted content from the local repository

This fixes a bug with the numcopies counting when using sync --content.
It did not always pass the local repo uuid to handleDropsFrom, and so the
numcopies counting was off by one, and unwanted local content would only be
dropped when there were numcopies+1 remote copies.

Also, support dropping local content that has reached an
exporttree remote that is not untrusted (currently only S3 remotes
with versioning).
This commit is contained in:
Joey Hess 2018-12-18 13:58:12 -04:00
parent 9438ecc30b
commit 6d381df0e6
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 36 additions and 13 deletions

View file

@ -4,3 +4,10 @@ has been transferred to an exporttree remote.
This normally doesn't matter since exporttree remotes are untrusted, but
S3 with versioning enabled is not untrusted and once a file reaches such a
remote it should be able to be dropped locally. --[[Joey]]
Actually, there are two bugs here, because sync --content also fails to
drop local unwanted content that's got only 1 copy on another remote.
It forgot to include the local copy as a currently present copy, throwing
off the numcopies counting. --[[Joey]]
Both [fixed|done]] --[[Joey]]