Use RSP file for soong_zip in target_files.zip
target_files.zip passes a list of files to soong_zip in a file list
file, which soong_zip interprets as a glob. Adding a file called "["
causes soong_zip to error with "syntax error in pattern". Use an RSP
file instead, which after I1de7829c668538204fc4a2ac793a4f88dbc886c9
does not interpret entries as globs.
Bug: 179297188
Test: m target-files-package
soong_zip: don't glob RSP file entries
File arguments are considered globs, but RSP file entries should be
considered filenames without globbing. Escape RSP file entries so
they don't get treated as globs later.
Bug: 179297188
Test: zip_test.go
Change-Id: I0736f2d1802114217cba03ee32b67479c9d98da8
diff --git a/core/Makefile b/core/Makefile
index 79255ca..a150241 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -5027,7 +5027,7 @@
@# help early validation of the .zip file while uploading it.
$(hide) find $(zip_root)/META | sort >$@.list
$(hide) find $(zip_root) -path $(zip_root)/META -prune -o -print | sort >>$@.list
- $(hide) $(SOONG_ZIP) -d -o $@ -C $(zip_root) -l $@.list
+ $(hide) $(SOONG_ZIP) -d -o $@ -C $(zip_root) -r $@.list
.PHONY: target-files-package
target-files-package: $(BUILT_TARGET_FILES_PACKAGE)