From 62283b96494cffd56ef8c947205982e88c790843 Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Mon, 17 Oct 2022 10:24:09 +0900 Subject: [PATCH] Skip flattened apexes while check_target_files_vintf Flattened apexes should be handled differently. For now just skip flattened apexes to fix the build breakage. Bug: 253669548 Bug: 253700117 Bug: 239055765 Test: m otapackage for targets with "flattened apexes" Change-Id: I102a961fc1365f42881ca9ee6546e71246792d2a --- .../releasetools/check_target_files_vintf.py | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 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)) + 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) + 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)