chiark / gitweb /
Add option to not use rsync --checksum
authorCiaran Gultnieks <ciaran@ciarang.com>
Sun, 11 Jan 2015 15:33:41 +0000 (15:33 +0000)
committerCiaran Gultnieks <ciaran@ciarang.com>
Sun, 11 Jan 2015 15:35:04 +0000 (15:35 +0000)
completion/bash-completion
fdroidserver/server.py

index b57b843b8c4fb80e23f97d278b0512f812aac229..0ace89464a5b37f9371b73612d65cde4d13ba55b 100644 (file)
@@ -250,7 +250,7 @@ __complete_stats() {
 __complete_server() {
        opts="-i -v -q"
        lopts="--identity-file --local-copy-dir --sync-from-local-copy-dir
- --verbose --quiet update"
+ --verbose --quiet --no-checksum update"
        __complete_options
 }
 
index b5da4be26a658dcf02f030e586440667cbc64f2d..26a66ae8899013f414e3e693914632c84a4c6fe2 100644 (file)
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 #
 # server.py - part of the FDroid server tools
-# Copyright (C) 2010-13, Ciaran Gultnieks, ciaran@ciarang.com
+# Copyright (C) 2010-15, Ciaran Gultnieks, ciaran@ciarang.com
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU Affero General Public License as published by
@@ -123,7 +123,9 @@ def update_awsbucket(repo_section):
 def update_serverwebroot(serverwebroot, repo_section):
     # use a checksum comparison for accurate comparisons on different
     # filesystems, for example, FAT has a low resolution timestamp
-    rsyncargs = ['rsync', '--archive', '--delete', '--checksum']
+    rsyncargs = ['rsync', '--archive', '--delete']
+    if not options.nochecksum:
+        rsyncargs.append('--checksum')
     if options.verbose:
         rsyncargs += ['--verbose']
     if options.quiet:
@@ -164,7 +166,8 @@ def _local_sync(fromdir, todir):
                  '--one-file-system', '--delete', '--chmod=Da+rx,Fa-x,a+r,u+w']
     # use stricter rsync checking on all files since people using offline mode
     # are already prioritizing security above ease and speed
-    rsyncargs += ['--checksum']
+    if not options.nochecksum:
+        rsyncargs.append('--checksum')
     if options.verbose:
         rsyncargs += ['--verbose']
     if options.quiet:
@@ -202,6 +205,8 @@ def main():
                       help="Spew out even more information than normal")
     parser.add_option("-q", "--quiet", action="store_true", default=False,
                       help="Restrict output to warnings and errors")
+    parser.add_option("--no-checksum", action="store_true", default=False,
+                      help="Don't use rsync checksums")
     (options, args) = parser.parse_args()
 
     config = common.read_config(options)