diff --git a/fdroidserver/deploy.py b/fdroidserver/deploy.py index 371f4ddb..12b81bb6 100644 --- a/fdroidserver/deploy.py +++ b/fdroidserver/deploy.py @@ -498,20 +498,24 @@ def update_serverwebroot(serverwebroot, repo_section): ] url = serverwebroot['url'] logging.info('rsyncing ' + repo_section + ' to ' + url) - excludes = _get_index_excludes(repo_section) - if subprocess.call(rsyncargs + excludes + [repo_section, url]) != 0: - raise FDroidException() - if subprocess.call(rsyncargs + [repo_section, url]) != 0: - raise FDroidException() - # upload "current version" symlinks if requested - if config and config.get('make_current_version_link') and repo_section == 'repo': - links_to_upload = [] - for f in glob.glob('*.apk') + glob.glob('*.apk.asc') + glob.glob('*.apk.sig'): - if os.path.islink(f): - links_to_upload.append(f) - if len(links_to_upload) > 0: - if subprocess.call(rsyncargs + links_to_upload + [url]) != 0: - raise FDroidException() + if options.index_only: + if subprocess.call(rsyncargs + ['--excludes', "*"] + _get_index_includes(repo_section) + [repo_section, url]) != 0: + raise FDroidException() + else: + excludes = _get_index_excludes(repo_section) + if subprocess.call(rsyncargs + excludes + [repo_section, url]) != 0: + raise FDroidException() + if subprocess.call(rsyncargs + [repo_section, url]) != 0: + raise FDroidException() + # upload "current version" symlinks if requested + if config and config.get('make_current_version_link') and repo_section == 'repo': + links_to_upload = [] + for f in glob.glob('*.apk') + glob.glob('*.apk.asc') + glob.glob('*.apk.sig'): + if os.path.islink(f): + links_to_upload.append(f) + if len(links_to_upload) > 0: + if subprocess.call(rsyncargs + links_to_upload + [url]) != 0: + raise FDroidException() def update_serverwebroots(serverwebroots, repo_section, standardwebroot=True):