deploy: give useful error if rsync is not installed

This commit is contained in:
Hans-Christoph Steiner 2023-06-01 20:23:00 +02:00
parent ed50de055a
commit 00aa595f37
2 changed files with 14 additions and 0 deletions

View file

@ -277,6 +277,12 @@ def update_serverwebroot(serverwebroot, repo_section):
has a low resolution timestamp
"""
try:
subprocess.run(['rsync', '--version'], capture_output=True, check=True)
except Exception as e:
raise FDroidException(
_('rsync is missing or broken: {error}').format(error=e)
) from e
rsyncargs = ['rsync', '--archive', '--delete-after', '--safe-links']
if not options.no_checksum:
rsyncargs.append('--checksum')