summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
author Tao Bao <tbao@google.com> 2016-09-29 21:59:06 -0700
committer Tao Bao <tbao@google.com> 2016-09-29 22:04:50 -0700
commitb31b94e159ee6074b359c334166d6fc6084ea69c (patch)
tree2e7abe4f010008f0553fd4037a5b44787dc41c63 /tools
parent8ee6d119d1edcd07985d3f0d15d9a44228eceb47 (diff)
releasetools: Fix the reference to OPTIONS.info_dict.
sign_target_files_apks.py calls common.GetBootableImage() but without calling 'OPTIONS = common.OPTIONS' first. In common.GetBootableImage(), we should use the local info_dict parameter instead of OPTIONS.info_dict. Test: sign_target_files_apks.py generates signed-TF.zip successfully. Change-Id: Ia3d32b88691c26e5fb98feea709e3e3c3eb70fdb
Diffstat (limited to 'tools')
-rw-r--r--tools/releasetools/common.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 564cd1788f..fad6a5ec28 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -514,13 +514,13 @@ def _BuildBootableImage(sourcedir, fs_config_file, info_dict=None,
img_keyblock.close()
# AVB: if enabled, calculate and add hash to boot.img.
- if OPTIONS.info_dict.get("board_avb_enable", None) == "true":
+ if info_dict.get("board_avb_enable", None) == "true":
avbtool = os.getenv('AVBTOOL') or "avbtool"
- part_size = OPTIONS.info_dict.get("boot_size", None)
+ part_size = info_dict.get("boot_size", None)
cmd = [avbtool, "add_hash_footer", "--image", img.name,
"--partition_size", str(part_size), "--partition_name", "boot"]
AppendAVBSigningArgs(cmd)
- args = OPTIONS.info_dict.get("board_avb_boot_add_hash_footer_args", None)
+ args = info_dict.get("board_avb_boot_add_hash_footer_args", None)
if args and args.strip():
cmd.extend(shlex.split(args))
p = Run(cmd, stdout=subprocess.PIPE)