chiark / gitweb /
Warn about prebuilt jar files when scanning
authorDaniel Martí <mvdan@mvdan.cc>
Mon, 30 Dec 2013 10:25:15 +0000 (11:25 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Thu, 9 Jan 2014 15:23:47 +0000 (16:23 +0100)
fdroidserver/build.py
fdroidserver/common.py

index 0bc49874d9b2305c2b2794e1298dcf4701018829..a861bc793b6303da0a1c96db046eebd947437920 100644 (file)
@@ -436,7 +436,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
     if len(buildprobs) > 0:
         print 'Scanner found ' + str(len(buildprobs)) + ' problems:'
         for problem in buildprobs:
-            print '...' + problem
+            print '    %s' % problem
         if not force:
             raise BuildException("Can't build due to " +
                 str(len(buildprobs)) + " scanned problems")
index a49e069d3ffffa417da50c5dec659bd33a690ead..1119c26762a0f2ef7ac8dda7fe1f9547e55c927b 100644 (file)
@@ -1237,6 +1237,9 @@ def scan_source(build_dir, root_dir, thisbuild):
         else:
             problems.append('Found %s at %s' % (what, fd))
 
+    def warnproblem(what, fd, fp):
+        print 'Warning: Found %s at %s' % (what, fd)
+
     # Iterate through all files in the source code...
     for r,d,f in os.walk(build_dir):
         for curfile in f:
@@ -1265,6 +1268,8 @@ def scan_source(build_dir, root_dir, thisbuild):
                 handleproblem('binary executable', fd, fp)
             elif mime == 'application/jar' and fp.endswith('.apk'):
                 removeproblem('APK file', fd, fp)
+            elif mime == 'application/jar' and fp.endswith('.jar'):
+                warnproblem('JAR file', fd, fp)
 
             elif curfile.endswith('.java'):
                 for line in file(fp):