Returns empty apex_infos if the apex target dir does not exist.
This is needed for partial builds that do not have the apex directory in their target files package. Test: build target files for a partial vendor-only build. Change-Id: I076bfbd1a81cccddcef795f5edeaf2b51538cdec
This commit is contained in:
@@ -516,7 +516,7 @@ def SignApex(avbtool, apex_data, payload_key, container_key, container_pw,
|
||||
raise ApexInfoError(
|
||||
'Failed to get type for {}:\n{}'.format(apex_file, e))
|
||||
|
||||
def GetApexInfoFromTargetFiles(input_file):
|
||||
def GetSystemApexInfoFromTargetFiles(input_file):
|
||||
"""
|
||||
Get information about system APEX stored in the input_file zip
|
||||
|
||||
@@ -538,6 +538,11 @@ def GetApexInfoFromTargetFiles(input_file):
|
||||
tmp_dir = UnzipTemp(input_file, ["SYSTEM/apex/*"])
|
||||
target_dir = os.path.join(tmp_dir, "SYSTEM/apex/")
|
||||
|
||||
# Partial target-files packages for vendor-only builds may not contain
|
||||
# a system apex directory.
|
||||
if not os.path.exists(target_dir):
|
||||
return []
|
||||
|
||||
apex_infos = []
|
||||
|
||||
debugfs_path = "debugfs"
|
||||
|
Reference in New Issue
Block a user