mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
Improve build output situation since logging changes
This commit is contained in:
parent
995e5c84f0
commit
cb3a08ff4b
@ -907,19 +907,19 @@ def main():
|
|||||||
logfile = open(os.path.join(log_dir, app['id'] + '.log'), 'a+')
|
logfile = open(os.path.join(log_dir, app['id'] + '.log'), 'a+')
|
||||||
logfile.write(str(be))
|
logfile.write(str(be))
|
||||||
logfile.close()
|
logfile.close()
|
||||||
logging.info("Could not build app %s due to BuildException: %s" % (app['id'], be))
|
print("Could not build app %s due to BuildException: %s" % (app['id'], be))
|
||||||
if options.stop:
|
if options.stop:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
failed_apps[app['id']] = be
|
failed_apps[app['id']] = be
|
||||||
wikilog = be.get_wikitext()
|
wikilog = be.get_wikitext()
|
||||||
except VCSException as vcse:
|
except VCSException as vcse:
|
||||||
logging.info("VCS error while building app %s: %s" % (app['id'], vcse))
|
print("VCS error while building app %s: %s" % (app['id'], vcse))
|
||||||
if options.stop:
|
if options.stop:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
failed_apps[app['id']] = vcse
|
failed_apps[app['id']] = vcse
|
||||||
wikilog = str(vcse)
|
wikilog = str(vcse)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.info("Could not build app %s due to unknown error: %s" % (app['id'], traceback.format_exc()))
|
print("Could not build app %s due to unknown error: %s" % (app['id'], traceback.format_exc()))
|
||||||
if options.stop:
|
if options.stop:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
failed_apps[app['id']] = e
|
failed_apps[app['id']] = e
|
||||||
|
@ -1073,11 +1073,13 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
|
|||||||
for d in update_dirs:
|
for d in update_dirs:
|
||||||
subdir = os.path.join(root_dir, d)
|
subdir = os.path.join(root_dir, d)
|
||||||
if d == '.':
|
if d == '.':
|
||||||
logging.info("Updating main project")
|
print("Updating main project")
|
||||||
cmd = parms + ['-p', d]
|
cmd = parms + ['-p', d]
|
||||||
else:
|
else:
|
||||||
logging.info("Updating subproject %s" % d)
|
print("Updating subproject %s" % d)
|
||||||
cmd = lparms + ['-p', d]
|
cmd = lparms + ['-p', d]
|
||||||
|
print cmd
|
||||||
|
print ' '.join(cmd)
|
||||||
p = FDroidPopen(cmd, cwd=root_dir)
|
p = FDroidPopen(cmd, cwd=root_dir)
|
||||||
# Check to see whether an error was returned without a proper exit
|
# Check to see whether an error was returned without a proper exit
|
||||||
# code (this is the case for the 'no target set or target invalid'
|
# code (this is the case for the 'no target set or target invalid'
|
||||||
@ -1339,6 +1341,10 @@ def FDroidPopen(commands, cwd=None, output=True):
|
|||||||
logging.info("Directory: %s" % cwd)
|
logging.info("Directory: %s" % cwd)
|
||||||
logging.info("> %s" % ' '.join(commands))
|
logging.info("> %s" % ' '.join(commands))
|
||||||
|
|
||||||
|
if cwd:
|
||||||
|
print("Directory: %s" % cwd)
|
||||||
|
print("> %s" % ' '.join(commands))
|
||||||
|
|
||||||
result = PopenResult()
|
result = PopenResult()
|
||||||
p = subprocess.Popen(commands, cwd=cwd,
|
p = subprocess.Popen(commands, cwd=cwd,
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
||||||
|
Loading…
Reference in New Issue
Block a user