chiark / gitweb /
server: remove unused --sync-from-local-copy-dir
authorHans-Christoph Steiner <hans@eds.org>
Mon, 10 Apr 2017 23:05:53 +0000 (01:05 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Tue, 11 Apr 2017 22:45:22 +0000 (00:45 +0200)
This option was not hooked up at all, and does not make sense as a command
line argument.  It should just be a config.py item.  In that case, the
presence of config.py marks the current dir as a repo, so there is no
longer a need to test for a dir called repo/ as a safety.  This makes the
setup easier, since sync_from_localcopy() now creates repo/ for the user.

fdroidserver/server.py
tests/run-tests

index 6e8a9d6e68582eb8064c4dc6d25d69a7bdbd2545..4874a57f54da2dcbdc25edf8809d4d3ad5293f63 100644 (file)
@@ -308,8 +308,6 @@ def main():
                         help="Specify an identity file to provide to SSH for rsyncing")
     parser.add_argument("--local-copy-dir", default=None,
                         help="Specify a local folder to sync the repo to")
-    parser.add_argument("--sync-from-local-copy-dir", action="store_true", default=False,
-                        help="Before uploading to servers, sync from local copy dir")
     parser.add_argument("--no-checksum", action="store_true", default=False,
                         help="Don't use rsync checksums")
     options = parser.parse_args()
@@ -417,7 +415,7 @@ def main():
     elif options.command == 'update':
         for repo_section in repo_sections:
             if local_copy_dir is not None:
-                if config['sync_from_local_copy_dir'] and os.path.exists(repo_section):
+                if config['sync_from_local_copy_dir']:
                     sync_from_localcopy(repo_section, local_copy_dir)
                 else:
                     update_localcopy(repo_section, local_copy_dir)
index 3c3dfc1a5ff4551e88f0a7fb9de3cc7dbec8c089..43641c4e12003a0bd6eaa3381d003315112ef60f 100755 (executable)
@@ -352,7 +352,8 @@ $fdroid server update --local-copy-dir=$LOCALCOPYDIR
 NEWREPOROOT=`create_test_dir`
 cd $NEWREPOROOT
 $fdroid init
-$fdroid server update --local-copy-dir=$LOCALCOPYDIR --sync-from-local-copy-dir
+echo "sync_from_local_copy_dir = True" >> config.py
+$fdroid server update --local-copy-dir=$LOCALCOPYDIR
 
 
 #------------------------------------------------------------------------------#