From 92cfd6fc2b620e40666caaba3398de45766a608d Mon Sep 17 00:00:00 2001 From: Alex Deymo Date: Tue, 26 Jan 2016 18:47:44 -0800 Subject: [PATCH] Place the META/ dir first in the target_files.zip. To help early verification of a target_files.zip being uploaded to our servers, we place the META/ directory first in the .zip file, so checks against the product_id.txt and product_version.txt don't need to wait for the whole file to upload. Note that META/*filesystem_config.txt files are generated and added to the .zip file at a later point, so they are not included at the beginning. Bug: 26806325 TEST=`make dist` and `unzip -l out/dist/edison-target_files-eng.$USER.zip` shows most META/ files first. Change-Id: I1955645412688f5c7823063ed56606b251daccfd --- core/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/Makefile b/core/Makefile index f64dc28aa9..18135d3174 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1724,8 +1724,11 @@ ifeq ($(BREAKPAD_GENERATE_SYMBOLS),true) @# If breakpad symbols have been generated, add them to the zip. $(hide) $(ACP) -r $(TARGET_OUT_BREAKPAD) $(zip_root)/BREAKPAD endif - @# Zip everything up, preserving symlinks - $(hide) (cd $(zip_root) && zip -qryX ../$(notdir $@) .) + @# Zip everything up, preserving symlinks and placing META/ files first to + @# help early validation of the .zip file while uploading it. + $(hide) (cd $(zip_root) && \ + zip -qryX ../$(notdir $@) ./META && \ + zip -qryXu ../$(notdir $@) .) @# Run fs_config on all the system, vendor, boot ramdisk, @# and recovery ramdisk files in the zip, and save the output $(hide) zipinfo -1 $@ | awk 'BEGIN { FS="SYSTEM/" } /^SYSTEM\// {print "system/" $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config -C -D $(TARGET_OUT) -S $(SELINUX_FC) > $(zip_root)/META/filesystem_config.txt