Make the partition=
tag optional.
Since we might use ToT release tools to sign a package generated by an older build, we make the new `partition=` tag optional. This also means we need to be careful to use non-greedy regex matching. Bug: 153133823 Test: python3 -m unittest Test: input with and without the new `partition=` tag Test: new test_ReadApkCerts_WithWithoutOptionalFields Change-Id: Ic57efd34e745ad302ae17150c6f2318f0b4524cb
This commit is contained in:
@@ -1082,8 +1082,8 @@ def ReadApexKeysInfo(tf_zip):
|
||||
r'public_key="(?P<PAYLOAD_PUBLIC_KEY>.*)"\s+'
|
||||
r'private_key="(?P<PAYLOAD_PRIVATE_KEY>.*)"\s+'
|
||||
r'container_certificate="(?P<CONTAINER_CERT>.*)"\s+'
|
||||
r'container_private_key="(?P<CONTAINER_PRIVATE_KEY>.*)"\s+'
|
||||
r'partition="(?P<PARTITION>.*)"$',
|
||||
r'container_private_key="(?P<CONTAINER_PRIVATE_KEY>.*?)"'
|
||||
r'(\s+partition="(?P<PARTITION>.*?)")?$',
|
||||
line)
|
||||
if not matches:
|
||||
continue
|
||||
|
Reference in New Issue
Block a user