From 341ccb61617809e9d64377b297308b2b2be500bd Mon Sep 17 00:00:00 2001 From: Tobias Thierer Date: Tue, 15 Aug 2017 20:39:35 +0100 Subject: [PATCH] Fix log spam in unzip-jar-files Commit 2bdbb6e93522b525f0322863baf9aeb5fd879d78 added command line flags to the unzip command in unzip-jar-files to skip the path 'module-info.class', if present. This has led to log spam because unzip warns when an excluded file is not present in the zip/jar file, and that warning cannot be suppressed via command line flags. Therefore, this CL modifies the unzip-jar-files macro to rm -f the module-info.class file after the fact, if it was created, which does not lead to log spam. Note that module-info.class will be filtered out of .jar dependencies (such as ASM 6.0) regardless of whether one is building with an OpenJDK 9+ toolchain. Test: Treehugger. Bug: 64719206 Change-Id: Ic6be806a50557b4ba13fc18da91a8af12d14586c --- core/definitions.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/definitions.mk b/core/definitions.mk index 023410c51..35318b059 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -2175,7 +2175,8 @@ define unzip-jar-files echo Missing file $$f; \ exit 1; \ fi; \ - unzip -qo $$f -d $(2) -x module-info.class; \ + unzip -qo $$f -d $(2); \ + rm -f $(2)/module-info.class; \ done $(if $(PRIVATE_DONT_DELETE_JAR_META_INF),,$(hide) rm -rf $(2)/META-INF) endef