aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2022-10-17 06:09:15 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-10-17 06:09:15 +0000
commit09d7031f7db379ab80e048a541624b9bd2916d9c (patch)
treec8b2fa4f061eb55e04c2cc93a03b72501e8ac2c9
parentddfc1ebf1429c7eb0f812354140405f88b5bcfc3 (diff)
parent62283b96494cffd56ef8c947205982e88c790843 (diff)
downloadbuild-09d7031f7db379ab80e048a541624b9bd2916d9c.tar.gz
Merge "Skip flattened apexes while check_target_files_vintf"
-rwxr-xr-xtools/releasetools/check_target_files_vintf.py28
1 files changed, 16 insertions, 12 deletions
diff --git a/tools/releasetools/check_target_files_vintf.py b/tools/releasetools/check_target_files_vintf.py
index e10291d1ee..fa2eaebac1 100755
--- a/tools/releasetools/check_target_files_vintf.py
+++ b/tools/releasetools/check_target_files_vintf.py
@@ -241,18 +241,22 @@ def PrepareApexDirectory(inp):
for f in os.listdir(path):
logger.info(' adding APEX %s', os.path.basename(f))
apex = os.path.join(path, f)
- cmd = [deapexer,
- '--debugfs_path', debugfs_path,
- 'info',
- apex]
- info = json.loads(common.RunAndCheckOutput(cmd))
-
- cmd = [deapexer,
- '--debugfs_path', debugfs_path,
- 'extract',
- apex,
- os.path.join(outp, info['name'])]
- common.RunAndCheckOutput(cmd)
+ if os.path.isdir(apex):
+ # TODO(b/242314000) Handle "flattened" apex
+ pass
+ else:
+ cmd = [deapexer,
+ '--debugfs_path', debugfs_path,
+ 'info',
+ apex]
+ info = json.loads(common.RunAndCheckOutput(cmd))
+
+ cmd = [deapexer,
+ '--debugfs_path', debugfs_path,
+ 'extract',
+ apex,
+ os.path.join(outp, info['name'])]
+ common.RunAndCheckOutput(cmd)
root_dir_name = 'APEX'
root_dir = os.path.join(inp, root_dir_name)