# Helper to copy the contents of a directory to the server...
def send_dir(path):
logging.debug("rsyncing " + path + " to " + ftp.getcwd())
- subprocess.check_call(['rsync', '-rple',
- 'ssh -o StrictHostKeyChecking=no' +
- ' -o UserKnownHostsFile=/dev/null' +
- ' -o LogLevel=FATAL' +
- ' -o IdentitiesOnly=yes' +
- ' -o PasswordAuthentication=no' +
- ' -p ' + str(sshinfo['port']) +
- ' -i ' + sshinfo['idfile'],
- path,
- sshinfo['user'] +
- "@" + sshinfo['hostname'] +
- ":" + ftp.getcwd()])
+ try:
+ subprocess.check_output(['rsync', '--recursive', '--perms', '--links', '--quiet', '--rsh=' +
+ 'ssh -o StrictHostKeyChecking=no' +
+ ' -o UserKnownHostsFile=/dev/null' +
+ ' -o LogLevel=FATAL' +
+ ' -o IdentitiesOnly=yes' +
+ ' -o PasswordAuthentication=no' +
+ ' -p ' + str(sshinfo['port']) +
+ ' -i ' + sshinfo['idfile'],
+ path,
+ sshinfo['user'] + "@" + sshinfo['hostname'] + ":" + ftp.getcwd()],
+ stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as e:
+ raise FDroidException(str(e), e.output.decode())
logging.info("Preparing server for build...")
serverpath = os.path.abspath(os.path.dirname(__file__))
# there are any.
if first:
vcs, build_dir = common.setup_vcs(app)
- logging.info("Using %s" % vcs.clientversion())
first = False
+ logging.info("Using %s" % vcs.clientversion())
logging.debug("Checking " + build.versionName)
if trybuild(app, build, build_dir, output_dir, log_dir,
also_check_dir, srclib_dir, extlib_dir,
logging.info(ngettext("{} build failed",
"{} builds failed", len(failed_apps)).format(len(failed_apps)))
- sys.exit(0)
+ # hack to ensure this exits, even is some threads are still running
+ sys.stdout.flush()
+ sys.stderr.flush()
+ os._exit(0)
if __name__ == "__main__":