mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
buildserver: display verbose logging in a background tail
This commit is contained in:
parent
4b03c3d42d
commit
675500ad88
1 changed files with 10 additions and 0 deletions
|
@ -11,6 +11,7 @@ import hashlib
|
||||||
import yaml
|
import yaml
|
||||||
from clint.textui import progress
|
from clint.textui import progress
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
import fdroidserver.tail
|
||||||
|
|
||||||
|
|
||||||
if not os.path.exists('makebuildserver') and not os.path.exists('buildserver'):
|
if not os.path.exists('makebuildserver') and not os.path.exists('buildserver'):
|
||||||
|
@ -362,9 +363,15 @@ elif os.path.exists('/proc/cpuinfo'):
|
||||||
config['hwvirtex'] = 'on'
|
config['hwvirtex'] = 'on'
|
||||||
|
|
||||||
logfilename = os.path.join(serverdir, 'up.log')
|
logfilename = os.path.join(serverdir, 'up.log')
|
||||||
|
if not os.path.exists(logfilename):
|
||||||
|
open(logfilename, 'a').close() # create blank file
|
||||||
log_cm = vagrant.make_file_cm(logfilename)
|
log_cm = vagrant.make_file_cm(logfilename)
|
||||||
v = vagrant.Vagrant(root=serverdir, out_cm=log_cm, err_cm=log_cm)
|
v = vagrant.Vagrant(root=serverdir, out_cm=log_cm, err_cm=log_cm)
|
||||||
|
|
||||||
|
if options.verbose:
|
||||||
|
tail = fdroidserver.tail.Tail(logfilename)
|
||||||
|
tail.start()
|
||||||
|
|
||||||
if options.clean:
|
if options.clean:
|
||||||
v.destroy()
|
v.destroy()
|
||||||
if config['vm_provider'] == 'libvirt':
|
if config['vm_provider'] == 'libvirt':
|
||||||
|
@ -438,3 +445,6 @@ print("Adding box")
|
||||||
v.box_add('buildserver', boxfile, force=True)
|
v.box_add('buildserver', boxfile, force=True)
|
||||||
|
|
||||||
os.remove(boxfile)
|
os.remove(boxfile)
|
||||||
|
|
||||||
|
if tail is not None:
|
||||||
|
tail.stop()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue