From 78491a0a5be89ec0ffff1365688bf84e7e4ff585 Mon Sep 17 00:00:00 2001 From: Marcus Hoffmann Date: Thu, 25 Jun 2020 01:14:40 +0200 Subject: [PATCH] add used extlibs to scanignore path fixes fdroid/fdroidserver#795 --- fdroidserver/common.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 5f057e40..d76b62e5 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -2111,6 +2111,13 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver= if not os.path.exists(libsrc): raise BuildException("Missing extlib file {0}".format(libsrc)) shutil.copyfile(libsrc, os.path.join(libsdir, libf)) + # Add extlibs to scanignore (this is relative to the build dir root, *sigh*) + if build.subdir: + scanignorepath = os.path.join(build.subdir, 'libs', libf) + else: + scanignorepath = os.path.join('libs', libf) + if scanignorepath not in build.scanignore: + build.scanignore.append(scanignorepath) # Run a pre-build command if one is required if build.prebuild: