chiark / gitweb /
A scientific solution to issues with vagrant 1.3.5
authorCiaran Gultnieks <ciaran@ciarang.com>
Thu, 9 Jan 2014 21:31:08 +0000 (21:31 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Thu, 9 Jan 2014 21:56:51 +0000 (22:56 +0100)
fdroidserver/build.py

index 03289b19d12400f2fffe32cfbfcda6e547ce915f..515b553f43563408fc986c9a1d6bc94a054a0e3e 100644 (file)
@@ -102,6 +102,8 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
                     if options.verbose:
                         print "...suspending"
                     vagrant(['suspend'], cwd='builder')
+                    print "...waiting a sec..."
+                    time.sleep(10)
                 p = subprocess.Popen(['VBoxManage', 'snapshot', get_builder_vm_id(), 'restore', 'fdroidclean'],
                     cwd='builder', stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
                 output = p.communicate()[0]
@@ -112,6 +114,8 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
                     retcode, output = vagrant(['up'], cwd='builder')
                     if retcode != 0:
                         raise BuildException("Failed to start build server")
+                    print "...waiting a sec..."
+                    time.sleep(10)
                     vm_ok = True
                 else:
                     print "...failed to reset to snapshot"
@@ -178,10 +182,14 @@ def build_server(app, thisbuild, vcs, build_dir, output_dir, force):
         if p.returncode != 0:
             print output
             raise BuildException("Failed to take snapshot")
+        print "...waiting a sec..."
+        time.sleep(10)
         print "Restarting new build server"
         retcode, _ = vagrant(['up'], cwd='builder')
         if retcode != 0:
             raise BuildException("Failed to start build server")
+        print "...waiting a sec..."
+        time.sleep(10)
         # Make sure it worked...
         p = subprocess.Popen(['VBoxManage', 'snapshot', get_builder_vm_id(), 'list', '--details'],
             cwd='builder', stdout=subprocess.PIPE, stderr=subprocess.STDOUT)