Create EXTRA_INSTALL_ZIPS variable
Make needs to know about the "extra" zip files that are extracted
to the staging directories so that it can track all the installed files
correctly.
Also add a utility tool for listing the contents of relevant zips.
Bug: 337869220
Test: m droid and checked the contents of file_list.txt when adding an android_app_set locally
Change-Id: Idc5dd785b03c05f7972c66620d4e6359892b3863
diff --git a/android/makevars.go b/android/makevars.go
index e73645f..b6bc14e 100644
--- a/android/makevars.go
+++ b/android/makevars.go
@@ -473,7 +473,7 @@
# Values written by Soong to generate install rules that can be amended by Kati.
-
+EXTRA_INSTALL_ZIPS :=
`)
preserveSymlinksFlag := "-d"
@@ -507,9 +507,12 @@
if extraFiles := install.extraFiles; extraFiles != nil {
fmt.Fprintf(buf, "\t( unzip -qDD -d '%s' '%s' 2>&1 | grep -v \"zipfile is empty\"; exit $${PIPESTATUS[0]} ) || \\\n", extraFiles.dir.String(), extraFiles.zip.String())
fmt.Fprintf(buf, "\t ( code=$$?; if [ $$code -ne 0 -a $$code -ne 1 ]; then exit $$code; fi )\n")
+ fmt.Fprintf(buf, "EXTRA_INSTALL_ZIPS += %s:%s\n", extraFiles.dir.String(), extraFiles.zip.String())
}
+
fmt.Fprintln(buf)
}
+ fmt.Fprintf(buf, ".KATI_READONLY := EXTRA_INSTALL_ZIPS\n")
for _, symlink := range symlinks {
fmt.Fprintf(buf, "%s:", symlink.to.String())