diff options
author | Cole Faust <colefaust@google.com> | 2024-05-10 12:39:05 -0700 |
---|---|---|
committer | Cole Faust <colefaust@google.com> | 2024-05-13 11:04:18 -0700 |
commit | 07c4537424ee27d0cbdcffc193e239aa40322dca (patch) | |
tree | 2cc560b319823d4f1f42ba90213681937184391a | |
parent | cd8dc7080692afa995e721d8b7dc3bc4ab9c2329 (diff) | |
download | soong-07c4537424ee27d0cbdcffc193e239aa40322dca.tar.gz |
Add the primary file to EXTRA_INSTALL_ZIPS
Make needs to know the primary file, because the zip is only extracted
when the primary file is installed.
Bug: 337869220
Test: m out/target/product/emu64x/obj/PACKAGING/system_intermediates/file_list.txt and checking it for the extra NetworkStackGoogle apks, with a local NetworkStackGoogle android_app_set added into the tree
Change-Id: I5cb7243d214f4730e3f9efb6746793f3bf4b8214
-rw-r--r-- | android/makevars.go | 2 | ||||
-rwxr-xr-x | scripts/extra_install_zips_file_list.py | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/android/makevars.go b/android/makevars.go index b6bc14e8f..f57ac4500 100644 --- a/android/makevars.go +++ b/android/makevars.go @@ -507,7 +507,7 @@ EXTRA_INSTALL_ZIPS := 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.Fprintf(buf, "EXTRA_INSTALL_ZIPS += %s:%s:%s\n", install.to.String(), extraFiles.dir.String(), extraFiles.zip.String()) } fmt.Fprintln(buf) diff --git a/scripts/extra_install_zips_file_list.py b/scripts/extra_install_zips_file_list.py index 8ea2a4bf0..148d6ccd9 100755 --- a/scripts/extra_install_zips_file_list.py +++ b/scripts/extra_install_zips_file_list.py @@ -18,13 +18,16 @@ def main(): parser.add_argument('staging_dir', help='Path to the partition staging directory') parser.add_argument('extra_install_zips', nargs='*', - help='The value of EXTRA_INSTALL_ZIPS from make. It should be a list of extraction_dir:zip_file pairs.') + help='The value of EXTRA_INSTALL_ZIPS from make. ' + 'It should be a list of primary_file:extraction_dir:zip_file trios. ' + 'The primary file will be ignored by this script, you should ensure that ' + 'the list of trios given to this script is already filtered by relevant primary files.') args = parser.parse_args() staging_dir = args.staging_dir.removesuffix('/') + '/' - for zip_pair in args.extra_install_zips: - d, z = zip_pair.split(':') + for zip_trio in args.extra_install_zips: + _, d, z = zip_trio.split(':') d = d.removesuffix('/') + '/' if d.startswith(staging_dir): |