definitions.mk: Detect bad zip files.
If the jar file passed to add-jar-resources-to-package is passed a non-zipfile, then we should produce an error. Bug: 153900481 Test: manual Change-Id: Idc4dd9afd89eaee08a9e792dfa2a759e64b783fc
This commit is contained in:
@@ -2329,6 +2329,7 @@ endef
|
|||||||
define add-jar-resources-to-package
|
define add-jar-resources-to-package
|
||||||
rm -rf $(3)
|
rm -rf $(3)
|
||||||
mkdir -p $(3)
|
mkdir -p $(3)
|
||||||
|
zipinfo -1 $(2) > /dev/null
|
||||||
unzip -qo $(2) -d $(3) $$(zipinfo -1 $(2) | grep -v -E "\.class$$")
|
unzip -qo $(2) -d $(3) $$(zipinfo -1 $(2) | grep -v -E "\.class$$")
|
||||||
$(JAR) uf $(1) $(call jar-args-sorted-files-in-directory,$(3))
|
$(JAR) uf $(1) $(call jar-args-sorted-files-in-directory,$(3))
|
||||||
endef
|
endef
|
||||||
|
Reference in New Issue
Block a user