From cabecd9c55863cc96739a7619f71785061dd8edd Mon Sep 17 00:00:00 2001 From: Nan Zhang Date: Mon, 20 Mar 2017 18:22:43 -0700 Subject: [PATCH] Fixed the issue that dirname: META got zipped twice. When building target-files-package, dir: META has to be copied first to help early validation of the .zip file. In order to prevent $(zip_root)/META from getting copied twice to $@.list, use the method (find -path -prune -o -print) instead of (grep pattern -v). Test: m target-files-package Bug: b/31676493 Change-Id: Id6b4d77fb62aa136253de88573cc51a575b90be2 --- core/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Makefile b/core/Makefile index cf0aa4a42..0dd5098d4 100644 --- a/core/Makefile +++ b/core/Makefile @@ -2161,7 +2161,7 @@ endif @# Zip everything up, preserving symlinks and placing META/ files first to @# help early validation of the .zip file while uploading it. $(hide) find $(zip_root)/META | sort >$@.list - $(hide) find $(zip_root) | grep -v "^$(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 .PHONY: target-files-package