chiark / gitweb /
Remove bin/ and gen/ in update= dirs too!
authorDaniel Martí <mvdan@mvdan.cc>
Wed, 21 Aug 2013 14:20:27 +0000 (16:20 +0200)
committerDaniel Martí <mvdan@mvdan.cc>
Wed, 21 Aug 2013 14:20:27 +0000 (16:20 +0200)
fdroidserver/common.py

index 7ec432b43d42e8cfee073c908add57878359c6ff..2802afaa59773aac4996c5e7093eccd9c3f58622 100644 (file)
@@ -1199,6 +1199,12 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, sdk_path,
                 os.remove(buildxml)
         for d in update_dirs:
             cwd = os.path.join(root_dir, d)
+            # Remove gen and bin dirs in libraries
+            # rid of them...
+            for baddir in ['gen', 'bin']:
+                badpath = os.path.join(cwd, baddir)
+                if os.path.exists(badpath):
+                    shutil.rmtree(badpath)
             if verbose:
                 print "Update of '%s': exec '%s' in '%s'"%\
                     (d," ".join(parms),cwd)