From 17e98b7ca22d033d7347782ef323a77dae4cd91f Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 3 Feb 2021 16:03:55 -0800 Subject: [PATCH] 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 --- core/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Makefile b/core/Makefile index 79255caec..a150241af 100644 --- a/core/Makefile +++ b/core/Makefile @@ -5027,7 +5027,7 @@ endif @# 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)