chiark / gitweb /
Run ant clean in update= dirs instead of removing dirs
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 6 Jan 2014 11:44:48 +0000 (12:44 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Thu, 9 Jan 2014 15:23:48 +0000 (16:23 +0100)
fdroidserver/common.py

index 47a006b4a1529932a9b99759d3f1d1583c476e0b..f648ef7d63fb71a0cb6b33e5895113786926ba78 100644 (file)
@@ -941,13 +941,9 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
                 os.remove(buildxml)
 
         for d in update_dirs:
-            # Remove gen and bin dirs in libraries
-            # rid of them...
-            for baddir in ['gen', 'bin', 'obj']
-                badpath = os.path.join(root_dir, d, baddir)
-                if os.path.exists(badpath):
-                    print "Removing '%s'" % badpath
-                    shutil.rmtree(badpath)
+            subdir = os.path.join(root_dir, d)
+            # Clean update dirs via ant
+            p = FDroidPopen(['ant', 'clean'], cwd=subdir)
             dparms = parms + ['-p', d]
             if options.verbose:
                 if d == '.':