1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-07-04 16:30:12 +02:00

Provide verbose output with --verbose

23b0b6bc added logging in case of an FDroidException on the build
server. This broke the log of apps that fail to build.

Prior to 23b0b6bc a failing build in the VM triggered a BuildException
on the server side but the build output was written to the log in the
finally part of build_server(). After 23b0b6bc the finally part writs
the build as well but the BuildException is caught in main() and the
build log is overwritten with the empty exception content. This patch
always adds the build log to the exception so it is written to the log.

Closes: #882
This commit is contained in:
Jochen Sprickerhof 2021-09-07 16:17:56 +02:00
parent 63eaa5469c
commit 2b41dffcb2

View File

@ -266,7 +266,7 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
else:
message = "Build.py failed on server for {0}:{1}"
raise BuildException(message.format(app.id, build.versionName),
None if options.verbose else str(output, 'utf-8'))
str(output, 'utf-8'))
# Retreive logs...
toolsversion_log = common.get_toolsversion_logname(app, build)
@ -292,7 +292,7 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
except Exception:
raise BuildException(
"Build failed for {0}:{1} - missing output files".format(
app.id, build.versionName), None if options.verbose else str(output, 'utf-8'))
app.id, build.versionName), str(output, 'utf-8'))
ftp.close()
finally: