chiark / gitweb /
Remove update=force
authorDaniel Martí <mvdan@mvdan.cc>
Tue, 11 Feb 2014 15:45:22 +0000 (16:45 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 11 Feb 2014 15:46:54 +0000 (16:46 +0100)
It is broken (doesn't support auto or multiple paths), generally useless and
builds using it can easily be fixed via init=rm -f build.xml

fdroidserver/common.py

index cc41aff2c70da26f56058ad70abda41389680309..53c1718c5e9c0876696ae0a1a9d91cceb18c4165 100644 (file)
@@ -757,7 +757,7 @@ class VCSException(Exception):
 # it, which may be a subdirectory of the actual project. If you want the base
 # directory of the project, pass 'basepath=True'.
 def getsrclib(spec, srclib_dir, srclibpaths=[], subdir=None,
-        basepath=False, raw=False, prepare=True, preponly=False, autoupdate=True):
+        basepath=False, raw=False, prepare=True, preponly=False):
 
     number = None
     subdir = None
@@ -892,12 +892,11 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
 
     # Get required source libraries
     srclibpaths = []
-    updatemode = build.get('update', 'auto')
     if 'srclibs' in build:
         logging.info("Collecting source libraries")
         for lib in build['srclibs'].split(';'):
             srclibpaths.append(getsrclib(lib, srclib_dir, srclibpaths,
-                preponly=onserver, autoupdate=(updatemode=='auto')))
+                preponly=onserver))
 
     for name, number, libpath in srclibpaths:
         place_srclib(root_dir, int(number) if number else None, libpath)
@@ -1100,6 +1099,7 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
             raise BuildException("Error running prebuild command for %s:%s" %
                     (app['id'], build['version']), p.stdout)
 
+    updatemode = build.get('update', 'auto')
     # Generate (or update) the ant build file, build.xml...
     if updatemode != 'no' and build['type'] == 'ant':
         parms = [os.path.join(config['sdk_path'], 'tools', 'android'), 'update']
@@ -1114,15 +1114,6 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
         else:
             update_dirs = [d.strip() for d in updatemode.split(';')]
 
-        # Force build.xml update if necessary
-        if updatemode == 'force' or 'target' in build:
-            if updatemode == 'force':
-                update_dirs = ['.']
-            buildxml = os.path.join(root_dir, 'build.xml')
-            if os.path.exists(buildxml):
-                logging.info('Force-removing old build.xml')
-                os.remove(buildxml)
-
         for d in update_dirs:
             subdir = os.path.join(root_dir, d)
             if d == '.':