Merge branch 'master' of git://gitorious.org/f-droid/fdroidserver

This commit is contained in:
David Black 2013-01-25 11:12:59 +00:00
commit 148dd2fdf9
2 changed files with 15 additions and 4 deletions

View file

@ -1053,6 +1053,12 @@ the specification for what's required to be Vagrant-compatible is very well
defined. This is the sensible and secure way to do it, since you know what's defined. This is the sensible and secure way to do it, since you know what's
in it. If you insist on taking a shortcut, ask CiaranG about it on IRC. in it. If you insist on taking a shortcut, ask CiaranG about it on IRC.
Documentation for creating a base box can be found at
@url{http://docs.vagrantup.com/v1/docs/base_boxes.html}.
You can use a different version or distro for the base box, so long as you
don't expect any help making it work.
With this base box installed, you can then go to the @code{fdroidserver} With this base box installed, you can then go to the @code{fdroidserver}
directory and run this: directory and run this:

View file

@ -216,8 +216,6 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, sdk_path, force):
# Execute the build script... # Execute the build script...
print "Starting build..." print "Starting build..."
chan = sshs.get_transport().open_session() chan = sshs.get_transport().open_session()
stdoutf = chan.makefile('r')
stderrf = chan.makefile_stderr('r')
cmdline = 'python build.py --on-server' cmdline = 'python build.py --on-server'
if force: if force:
cmdline += ' --force --test' cmdline += ' --force --test'
@ -226,9 +224,16 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, sdk_path, force):
output = '' output = ''
error = '' error = ''
while not chan.exit_status_ready(): while not chan.exit_status_ready():
output += stdoutf.read() while chan.recv_ready():
error += stderrf.read() output += chan.recv(1024)
while chan.recv_stderr_ready():
error += chan.recv_stderr(1024)
print "...getting exit status"
returncode = chan.recv_exit_status() returncode = chan.recv_exit_status()
while chan.recv_ready():
output += chan.recv(1024)
while chan.recv_stderr_ready():
error += chan.recv_stderr(1024)
if returncode != 0: if returncode != 0:
raise BuildException("Build.py failed on server for %s:%s" % (app['id'], thisbuild['version']), output.strip(), error.strip()) raise BuildException("Build.py failed on server for %s:%s" % (app['id'], thisbuild['version']), output.strip(), error.strip())