From 2e1f5271c5fb7322daeebb28d25d8bfe1057a012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kan=20Kvist?= Date: Tue, 11 May 2021 11:14:48 +0200 Subject: [PATCH] When checking if mke2fs is used, compare using basename build_image adds additional parameters (uuid, hash_seed) if prop_dict["ext_mkuserimg"] is set to "mkuserimg_mke2fs". The comparison does not take paths into consideration, so passing a full path to mkuserimg_mke2fs would cause the parameters to not be included. This is currently not an issue for aosp builds, but could cause problems for customized build systems. Bug: 187742822 Test: Manual, using vendor build system, also executed 'm droid' Change-Id: I7a8973dd0c4d8a39aea5aafcfe1aa69750fb1449 --- tools/releasetools/build_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py index 2492da9877..13c5363b0b 100755 --- a/tools/releasetools/build_image.py +++ b/tools/releasetools/build_image.py @@ -283,7 +283,7 @@ def BuildImageMkfs(in_dir, prop_dict, out_file, target_out, fs_config): if "flash_logical_block_size" in prop_dict: build_command.extend(["-o", prop_dict["flash_logical_block_size"]]) # Specify UUID and hash_seed if using mke2fs. - if prop_dict["ext_mkuserimg"] == "mkuserimg_mke2fs": + if os.path.basename(prop_dict["ext_mkuserimg"]) == "mkuserimg_mke2fs": if "uuid" in prop_dict: build_command.extend(["-U", prop_dict["uuid"]]) if "hash_seed" in prop_dict: