Also check empty SKU if SKUS are not defined
In the case when both ODM_MANIFEST_SKUS and ODM_MANIFEST_FILE are
both empty, also checks VINTF compatibility for empty SKU case.
Same for device manifest. Although right now, DEVICE_MANIFEST_FILE and
DEVICE_MANIFEST_SKUS cannot be both empty (because libvintf requires
vendor manifest exists barring manifest fragments), let libvintf throws
an error for this case. In the build system, simply handle vendor manifest
the same way as ODM manifest.
Bug: 148601741
Test: manual
Change-Id: Ia0655fd4d37f6286b164a3221ec4b2716f29147d
diff --git a/tools/releasetools/check_target_files_vintf.py b/tools/releasetools/check_target_files_vintf.py
index 24c6dcb..b3d491f 100755
--- a/tools/releasetools/check_target_files_vintf.py
+++ b/tools/releasetools/check_target_files_vintf.py
@@ -68,11 +68,12 @@
def GetArgsForSkus(info_dict):
odm_skus = info_dict.get('vintf_odm_manifest_skus', '').strip().split()
- if info_dict.get('vintf_include_empty_odm_sku', '') == "true":
+ if info_dict.get('vintf_include_empty_odm_sku', '') == "true" or not odm_skus:
odm_skus += ['']
vendor_skus = info_dict.get('vintf_vendor_manifest_skus', '').strip().split()
- if info_dict.get('vintf_include_empty_vendor_sku', '') == "true":
+ if info_dict.get('vintf_include_empty_vendor_sku', '') == "true" or \
+ not vendor_skus:
vendor_skus += ['']
return [['--property', 'ro.boot.product.hardware.sku=' + odm_sku,