summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2018-06-23 10:08:59 +0200
committerHan Wang <416810799@qq.com>2019-01-24 15:22:15 +0100
commit96180ac8b7b58ead21198be5d43a63c5e94a90e9 (patch)
tree560928d87521d6d5b8959ab654b36785fe007856
parent3dfac18963b9cafb68c58adf3bbd48a25141640c (diff)
oneplus2: releasetools: Split up getting android-info.txt
input_zip does not exist when generating an incremental OTA, which results in an error when it tries to package one. The correct replacement for that would be target_zip. Split up the process of getting the device-specific information by passing corresponding zip as a parameter to AddModemAssertion() Change-Id: Ib246658f71d9f30a0aa34e902a400ef108a3ed1f
-rwxr-xr-xreleasetools.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/releasetools.py b/releasetools.py
index d973c85..6496237 100755
--- a/releasetools.py
+++ b/releasetools.py
@@ -1,6 +1,6 @@
# Copyright (C) 2009 The Android Open Source Project
# Copyright (c) 2011, The Linux Foundation. All rights reserved.
-# Copyright (C) 2017 The LineageOS Project
+# Copyright (C) 2017-2018 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -19,15 +19,15 @@ import common
import re
def FullOTA_Assertions(info):
- AddModemAssertion(info)
+ AddModemAssertion(info, info.input_zip)
return
def IncrementalOTA_Assertions(info):
- AddModemAssertion(info)
+ AddModemAssertion(info, info.target_zip)
return
-def AddModemAssertion(info):
- android_info = info.input_zip.read("OTA/android-info.txt")
+def AddModemAssertion(info, input_zip):
+ android_info = input_zip.read("OTA/android-info.txt")
m = re.search(r'require\s+version-modem\s*=\s*(.+)', android_info)
if m:
version = m.group(1).rstrip()