| from ClientForm import ParseResponse |
from ClientForm import ParseResponse |
| |
|
| debug=0 |
debug=0 |
| clean=0 |
clean=1 |
| dont_build=1 |
dont_build=0 |
| verbose=1 |
verbose=1 |
| |
|
| # parse host-specific configuration information from gkb.cfg |
# parse host-specific configuration information from gkb.cfg |
| output.write(data) |
output.write(data) |
| data = input.read(2048) |
data = input.read(2048) |
| |
|
| def runcmd(cmd, kinfo, outfile=None, append=False, infile=None): |
def runcmd(cmd, kinfo=None, outfile=None, append=False, infile=None): |
| """run the specified command, with the optional input and output documents""" |
"""run the specified command, with the optional input and output documents""" |
| log("running " + clean(cmd), kinfo) |
log("running " + clean(cmd), kinfo) |
| |
|
| verifydir("%s/work" % buildroot) # build dir, make sure it exists |
verifydir("%s/work" % buildroot) # build dir, make sure it exists |
| |
|
| # download the build jobs from the master site |
# download the build jobs from the master site |
| if runcmd("wget --quiet --output-document=gkb.xml \"%s/manager.php?cmd=getjobs&host=%s&pass=%s\"" % (msite,host,passwd), kinfo): |
if runcmd("wget --quiet --output-document=gkb.xml \"%s/manager.php?cmd=getjobs&host=%s&pass=%s\"" % (msite,host,passwd)): |
| raise FatalError, "Unable to download build config from master site %s, aborting." % msite |
raise FatalError, "Unable to download build config from master site %s, aborting." % msite |
| |
|
| # sets up 'mastertrees' and 'builds' dicts |
# sets up 'mastertrees' and 'builds' dicts |