From b74c848d6edc4455b83d4f344f1b2ee2073a670f Mon Sep 17 00:00:00 2001 From: proletarius101 Date: Mon, 3 Jun 2024 00:45:45 +0800 Subject: [PATCH] fix(deploy): all files are uploaded if the index only mode deployment follows a full mode one let rsync only sync necessary files --- fdroidserver/deploy.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fdroidserver/deploy.py b/fdroidserver/deploy.py index 517a9439..b00fbdc7 100644 --- a/fdroidserver/deploy.py +++ b/fdroidserver/deploy.py @@ -689,8 +689,12 @@ def update_servergitmirrors(servergitmirrors, repo_section): for d in servergitmirrors: # trailing slashes have a meaning in rsync which is not needed here, so # make sure both paths have exactly one trailing slash + if d.get('index_only', False): + files_to_sync = [str(working_dir_root / repo_section / index_file) for index_file in INDEX_FILES] + else: + files_to_sync = [str(working_dir_root / repo_section).rstrip('/') + '/'] common.local_rsync(common.get_options(), - [str(working_dir_root / repo_section).rstrip('/') + '/'], + files_to_sync, git_repodir.rstrip('/') + '/') upload_to_servergitmirror(mirror_config=d,