← Back to team overview

duplicity-team team mailing list archive

[Merge] lp:~dawgfoto/duplicity/skip_sync_collection_status into lp:duplicity/0.7-series

 

Martin Nowak has proposed merging lp:~dawgfoto/duplicity/skip_sync_collection_status into lp:duplicity/0.7-series.

Requested reviews:
  duplicity-team (duplicity-team)

For more details, see:
https://code.launchpad.net/~dawgfoto/duplicity/skip_sync_collection_status/+merge/326716

collection-status should not sync metadata
- up-to-date local metadata is not needed as collection-status is generated from remote file list
- syncing metadata might require to download several GBs

The syncing was introduced with http://bazaar.launchpad.net/~duplicity-team/duplicity/0.7-series/revision/759.2.1/duplicity-bin but seems unnecessary/unrelated to fix that bug.
-- 
Your team duplicity-team is requested to review the proposed merge of lp:~dawgfoto/duplicity/skip_sync_collection_status into lp:duplicity/0.7-series.
=== modified file 'bin/duplicity'
--- bin/duplicity	2017-05-11 10:44:21 +0000
+++ bin/duplicity	2017-07-03 23:59:24 +0000
@@ -1004,7 +1004,7 @@
                    _("Rerun command with --force option to actually delete."))
 
 
-def sync_archive(decrypt):
+def sync_archive():
     """
     Synchronize local archive manifest file and sig chains to remote archives.
     Copy missing files from remote to local as needed to make sure the local
@@ -1183,11 +1183,8 @@
         if not globals.dry_run:
             log.Notice(_("Synchronizing remote metadata to local cache..."))
             if local_missing and (rem_needpass or loc_needpass):
-                if decrypt:
-                    # password for the --encrypt-key
-                    globals.gpg_profile.passphrase = get_passphrase(1, "sync")
-                else:
-                    local_missing = []  # don't download if we can't decrypt
+                # password for the --encrypt-key
+                globals.gpg_profile.passphrase = get_passphrase(1, "sync")
             for fn in local_spurious:
                 remove_local(fn)
             if hasattr(globals.backend, 'pre_process_download'):
@@ -1402,8 +1399,8 @@
     check_resources(action)
 
     # check archive synch with remote, fix if needed
-    decrypt = action not in ["collection-status"]
-    sync_archive(decrypt)
+    if action not in ["collection-status"]:
+        sync_archive()
 
     # get current collection status
     col_stats = collections.CollectionsStatus(globals.backend,
@@ -1476,7 +1473,7 @@
     elif action == "remove-all-but-n-full" or action == "remove-all-inc-of-but-n-full":
         remove_all_but_n_full(col_stats)
     elif action == "sync":
-        sync_archive(True)
+        sync_archive()
     else:
         assert action == "inc" or action == "full", action
         # the passphrase for full and inc is used by --sign-key


References