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
This commit is contained in:
parent
610cbc900e
commit
69430e65fe
2 changed files with 18 additions and 5 deletions
|
@ -3722,8 +3722,12 @@ ifneq ($(check_vintf_vendor_deps),)
|
|||
check_vintf_has_vendor := true
|
||||
check_vintf_vendor_log := $(intermediates)/check_vintf_vendor_log
|
||||
check_vintf_all_deps += $(check_vintf_vendor_log)
|
||||
# Check vendor SKU=(empty) case when:
|
||||
# - DEVICE_MANIFEST_FILE is not empty; OR
|
||||
# - DEVICE_MANIFEST_FILE is empty AND DEVICE_MANIFEST_SKUS is empty (only vendor manifest fragments are used)
|
||||
$(check_vintf_vendor_log): PRIVATE_VENDOR_SKUS := \
|
||||
$(if $(DEVICE_MANIFEST_FILE),EMPTY_VENDOR_SKU_PLACEHOLDER) \
|
||||
$(if $(DEVICE_MANIFEST_FILE),EMPTY_VENDOR_SKU_PLACEHOLDER,\
|
||||
$(if $(DEVICE_MANIFEST_SKUS),,EMPTY_VENDOR_SKU_PLACEHOLDER)) \
|
||||
$(DEVICE_MANIFEST_SKUS)
|
||||
$(check_vintf_vendor_log): $(HOST_OUT_EXECUTABLES)/checkvintf $(check_vintf_vendor_deps)
|
||||
$(foreach vendor_sku,$(PRIVATE_VENDOR_SKUS), \
|
||||
|
@ -3823,11 +3827,19 @@ endif # PRODUCT_SHIPPING_API_LEVEL
|
|||
|
||||
$(check_vintf_compatible_log): PRIVATE_CHECK_VINTF_ARGS := $(check_vintf_compatible_args)
|
||||
$(check_vintf_compatible_log): PRIVATE_CHECK_VINTF_DEPS := $(check_vintf_compatible_deps)
|
||||
# Check ODM SKU=(empty) case when:
|
||||
# - ODM_MANIFEST_FILES is not empty; OR
|
||||
# - ODM_MANIFEST_FILES is empty AND ODM_MANIFEST_SKUS is empty (only ODM manifest fragments are used)
|
||||
$(check_vintf_compatible_log): PRIVATE_ODM_SKUS := \
|
||||
$(if $(ODM_MANIFEST_FILES),EMPTY_ODM_SKU_PLACEHOLDER) \
|
||||
$(if $(ODM_MANIFEST_FILES),EMPTY_ODM_SKU_PLACEHOLDER,\
|
||||
$(if $(ODM_MANIFEST_SKUS),,EMPTY_ODM_SKU_PLACEHOLDER)) \
|
||||
$(ODM_MANIFEST_SKUS)
|
||||
# Check vendor SKU=(empty) case when:
|
||||
# - DEVICE_MANIFEST_FILE is not empty; OR
|
||||
# - DEVICE_MANIFEST_FILE is empty AND DEVICE_MANIFEST_SKUS is empty (only vendor manifest fragments are used)
|
||||
$(check_vintf_compatible_log): PRIVATE_VENDOR_SKUS := \
|
||||
$(if $(DEVICE_MANIFEST_FILE),EMPTY_VENDOR_SKU_PLACEHOLDER) \
|
||||
$(if $(DEVICE_MANIFEST_FILE),EMPTY_VENDOR_SKU_PLACEHOLDER,\
|
||||
$(if $(DEVICE_MANIFEST_SKUS),,EMPTY_VENDOR_SKU_PLACEHOLDER)) \
|
||||
$(DEVICE_MANIFEST_SKUS)
|
||||
$(check_vintf_compatible_log): $(HOST_OUT_EXECUTABLES)/checkvintf $(check_vintf_compatible_deps)
|
||||
@echo -n -e 'Deps: \n ' > $@
|
||||
|
|
|
@ -68,11 +68,12 @@ def GetDirmap(input_tmp):
|
|||
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue