diff options
author | Tao Bao <tbao@google.com> | 2015-10-17 00:09:35 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-10-17 00:09:35 +0000 |
commit | 46ae586ab26f5bf63baaac6c68942f1bfba4addc (patch) | |
tree | 94d9e33a36a995a591de02b01b2f1aebc09e4ced /tools/releasetools/common.py | |
parent | 57a64e015c0dd670f9adf5a2016526678ce96a1e (diff) | |
parent | e09359abc0f8c29fbb16d35ab7375d80fde6f931 (diff) | |
download | build-46ae586ab26f5bf63baaac6c68942f1bfba4addc.zip build-46ae586ab26f5bf63baaac6c68942f1bfba4addc.tar.gz build-46ae586ab26f5bf63baaac6c68942f1bfba4addc.tar.bz2 |
am e09359ab: DO NOT MERGE Pass source\'s info_dict to vendor\'s releasetools.py.
* commit 'e09359abc0f8c29fbb16d35ab7375d80fde6f931':
DO NOT MERGE Pass source's info_dict to vendor's releasetools.py.
Diffstat (limited to 'tools/releasetools/common.py')
-rw-r--r-- | tools/releasetools/common.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index ebf47cb..94eacc2 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -59,6 +59,8 @@ class Options(object): self.device_specific = None self.extras = {} self.info_dict = None + self.source_info_dict = None + self.target_info_dict = None self.worker_threads = None @@ -1195,7 +1197,11 @@ class BlockDifference(object): self.path = os.path.join(tmpdir, partition) b.Compute(self.path) - _, self.device = GetTypeAndDevice("/" + partition, OPTIONS.info_dict) + if src is None: + _, self.device = GetTypeAndDevice("/" + partition, OPTIONS.info_dict) + else: + _, self.device = GetTypeAndDevice("/" + partition, + OPTIONS.source_info_dict) def WriteScript(self, script, output_zip, progress=None): if not self.src: @@ -1393,6 +1399,8 @@ def MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img, output_sink("recovery-from-boot.p", patch) try: + # The following GetTypeAndDevice()s need to use the path in the target + # info_dict instead of source_info_dict. boot_type, boot_device = GetTypeAndDevice("/boot", info_dict) recovery_type, recovery_device = GetTypeAndDevice("/recovery", info_dict) except KeyError: |