From: Tao Bao Date: Fri, 20 Nov 2015 01:05:46 +0000 (-0800) Subject: releasetools: Fix the bug with TARGET_NO_RECOVERY. X-Git-Tag: android-x86-7.1-r1~492^2~51^2~7 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=448dccbc7da2b666b2159632173d8896d276c6f3;p=android-x86%2Fbuild.git releasetools: Fix the bug with TARGET_NO_RECOVERY. The packaging script is broken when we set TARGET_NO_RECOVERY and SYSTEM_ROOT_IMAGE both. With TARGET_NO_RECOVERY set, we don't have RECOVERY/RAMDISK/etc/recovery.fstab. It thus fails the assertion that "/" must exist in fstab when enabling SYSTEM_ROOT_IMAGE. Change-Id: Id509d724f18be7cf7389dd786924ead894ac0cc1 (cherry picked from commit 48550cceb0bc4a7a0ec05aa87f8b5872b9ac7246) --- diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 31aeca722..ca9952d1e 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -210,8 +210,11 @@ def LoadInfoDict(input_file, input_dir=None): makeint("boot_size") makeint("fstab_version") - d["fstab"] = LoadRecoveryFSTab(read_helper, d["fstab_version"], - d.get("system_root_image", False)) + if d.get("no_recovery", False) == "true": + d["fstab"] = None + else: + d["fstab"] = LoadRecoveryFSTab(read_helper, d["fstab_version"], + d.get("system_root_image", False)) d["build.prop"] = LoadBuildProp(read_helper) return d