From ecd074c196872ff6249be28d04269b20fbb9eb60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Mon, 30 Dec 2013 11:25:15 +0100 Subject: [PATCH] Warn about prebuilt jar files when scanning --- fdroidserver/build.py | 2 +- fdroidserver/common.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/fdroidserver/build.py b/fdroidserver/build.py index 0bc49874..a861bc79 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -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") diff --git a/fdroidserver/common.py b/fdroidserver/common.py index a49e069d..1119c267 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -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):