chiark / gitweb /
build: error properly if an invalid ndk is used
[fdroidserver.git] / fdroidserver / build.py
index bad025a6d9a37258aedad1bada262e1a82301f6e..70ad1aee6a9460afcc023aeaa98009cddeb6f27a 100644 (file)
@@ -271,7 +271,7 @@ def build_server(app, build, vcs, build_dir, output_dir, force):
 
         # Get an SFTP connection...
         ftp = sshs.open_sftp()
-        ftp.get_channel().settimeout(15)
+        ftp.get_channel().settimeout(60)
 
         # Put all the necessary files in place...
         ftp.chdir(homedir)
@@ -388,8 +388,7 @@ def build_server(app, build, vcs, build_dir, output_dir, force):
         if options.verbose:
             cmdline += ' --verbose'
         cmdline += " %s:%s" % (app.id, build.vercode)
-        cmdline = '. /etc/profile && ' + cmdline
-        chan.exec_command('bash -c "' + cmdline + '"')
+        chan.exec_command('bash --login -c "' + cmdline + '"')
         output = bytes()
         while not chan.exit_status_ready():
             while chan.recv_ready():
@@ -459,7 +458,7 @@ def build_local(app, build, vcs, build_dir, output_dir, srclib_dir, extlib_dir,
     """Do a build locally."""
 
     ndk_path = build.ndk_path()
-    if build.buildjni and build.buildjni != ['no']:
+    if build.ndk or (build.buildjni and build.buildjni != ['no']):
         if not ndk_path:
             logging.critical("Android NDK version '%s' could not be found!" % build.ndk or 'r10e')
             logging.critical("Configured versions:")