chiark / gitweb /
Handle multiple uses of extlib subdirectory
authorCiaran Gultnieks <ciaran@ciarang.com>
Tue, 5 Mar 2013 19:47:52 +0000 (19:47 +0000)
committerCiaran Gultnieks <ciaran@ciarang.com>
Tue, 5 Mar 2013 19:47:52 +0000 (19:47 +0000)
fdroidserver/build.py

index bfe35446dd13357e701b1763fa3d785cf2402fe7..1a2aa293f5e190090969f573e5d2b76a0d1a34cd 100644 (file)
@@ -87,8 +87,9 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, sdk_path, force):
 
         # Open SSH connection to make sure it's working and ready...
         print "Connecting to virtual machine..."
-        subprocess.call('vagrant ssh-config >sshconfig',
-                cwd='builder', shell=True)
+        if subprocess.call('vagrant ssh-config >sshconfig',
+                cwd='builder', shell=True) != 0:
+            raise BuildException("Error getting ssh config")
         vagranthost = 'default' # Host in ssh config file
         sshconfig = ssh.SSHConfig()
         sshf = open('builder/sshconfig', 'r')
@@ -191,7 +192,8 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, sdk_path, force):
             for lib in thisbuild['extlibs'].split(';'):
                 lp = lib.split('/')
                 for d in lp[:-1]:
-                    ftp.mkdir(d)
+                    if d not in ftp.listdir():
+                        ftp.mkdir(d)
                     ftp.chdir(d)
                 ftp.put(os.path.join('build/extlib', lib), lp[-1])
                 for _ in lp[:-1]: