mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
build: better logging output on rsync failures
Save rsync error output and combine that with the command invocation into an FDroidException which can be logged to the wiki. This additionally sets -q for rsync to only print errors.
This commit is contained in:
parent
bb643eddcf
commit
e12e1b6a5c
1 changed files with 16 additions and 12 deletions
|
|
@ -100,7 +100,8 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
|
||||||
# Helper to copy the contents of a directory to the server...
|
# Helper to copy the contents of a directory to the server...
|
||||||
def send_dir(path):
|
def send_dir(path):
|
||||||
logging.debug("rsyncing " + path + " to " + ftp.getcwd())
|
logging.debug("rsyncing " + path + " to " + ftp.getcwd())
|
||||||
subprocess.check_call(['rsync', '-rple',
|
try:
|
||||||
|
subprocess.check_output(['rsync', '-rplqe',
|
||||||
'ssh -o StrictHostKeyChecking=no' +
|
'ssh -o StrictHostKeyChecking=no' +
|
||||||
' -o UserKnownHostsFile=/dev/null' +
|
' -o UserKnownHostsFile=/dev/null' +
|
||||||
' -o LogLevel=FATAL' +
|
' -o LogLevel=FATAL' +
|
||||||
|
|
@ -111,7 +112,10 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
|
||||||
path,
|
path,
|
||||||
sshinfo['user'] +
|
sshinfo['user'] +
|
||||||
"@" + sshinfo['hostname'] +
|
"@" + sshinfo['hostname'] +
|
||||||
":" + ftp.getcwd()])
|
":" + ftp.getcwd()],
|
||||||
|
stderr=subprocess.STDOUT)
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
raise FDroidException(str(e), e.output.decode())
|
||||||
|
|
||||||
logging.info("Preparing server for build...")
|
logging.info("Preparing server for build...")
|
||||||
serverpath = os.path.abspath(os.path.dirname(__file__))
|
serverpath = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue