Merge "Support relative key path in VerifiedBootVersion2VerityImageBuilder" am: b69bcdec29 am: cdd4c44b43 am: e1c32a82ed am: 2199bf3cdc

Original change: https://android-review.googlesource.com/c/platform/build/+/1976677

Change-Id: I0b2e9b09d3fa0e798907d14902bcf88037f07b27
This commit is contained in:
Kelvin Zhang
2022-02-10 05:42:47 +00:00
committed by Automerger Merge Worker

View File

@@ -379,6 +379,11 @@ class VerifiedBootVersion2VerityImageBuilder(VerityImageBuilder):
self.avbtool = avbtool
self.algorithm = algorithm
self.key_path = key_path
if key_path and not os.path.exists(key_path) and OPTIONS.search_path:
new_key_path = os.path.join(OPTIONS.search_path, key_path)
if os.path.exists(new_key_path):
self.key_path = new_key_path
self.salt = salt
self.signing_args = signing_args
self.image_size = None