Make side change for prod override vars support.

For the new override vars, we don't support make-based overrides because
their primary purpose is to enable Soong migrations for the ones that
use inherit-package.

Bug: 122957760
Test: Manual build tests with Browser2, BrowserGoogle, and Chrome
Change-Id: Ia685511391f61fe143774e12b3b67b526049962a
This commit is contained in:
Jaewoong Jung 2019-01-28 16:19:33 -08:00
parent 7839861087
commit 7dfae5023a
3 changed files with 17 additions and 10 deletions

View File

@ -216,6 +216,8 @@ _product_var_list := \
PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS \
PRODUCT_XOM_EXCLUDE_PATHS \
PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES \
PRODUCT_PACKAGE_NAME_OVERRIDES \
PRODUCT_CERTIFICATE_OVERRIDES \
PRODUCT_BUILD_SYSTEM_IMAGE \
PRODUCT_BUILD_SYSTEM_OTHER_IMAGE \
PRODUCT_BUILD_VENDOR_IMAGE \

View File

@ -349,10 +349,6 @@ PRODUCT_SHIPPING_API_LEVEL := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SHI
PRODUCT_DEFAULT_PROPERTY_OVERRIDES := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_DEFAULT_PROPERTY_OVERRIDES))
$(foreach rule,$(PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES),\
$(if $(filter 2,$(words $(subst :,$(space),$(rule)))),,\
$(error Rule "$(rule)" in PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDE is not <module_name>:<manifest_name>)))
.KATI_READONLY := PRODUCT_DEFAULT_PROPERTY_OVERRIDES
# A list of property assignments, like "key = value", with zero or more
@ -567,12 +563,19 @@ PRODUCT_FORCE_PRODUCT_MODULES_TO_SYSTEM_PARTITION := \
PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS))
# List of <module_name>:<manifest_name> pairs to override the manifest package name
# of a module <module_name> to <manifest_name>. Patterns can be used as in
# com.android.%:com.acme.android.%.release
PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES := \
$(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES))
.KATI_READONLY := PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES
define product-overrides-config
PRODUCT_$(1)_OVERRIDES := $$(strip $$(PRODUCTS.$$(INTERNAL_PRODUCT).PRODUCT_$(1)_OVERRIDES))
.KATI_READONLY := PRODUCT_$(1)_OVERRIDES
$$(foreach rule,$$(PRODUCT_$(1)_OVERRIDES),\
$$(if $$(filter 2,$$(words $$(subst :,$$(space),$$(rule)))),,\
$$(error Rule "$$(rule)" in PRODUCT_$(1)_OVERRIDE is not <module_name>:<new_value>)))
endef
$(foreach var, \
MANIFEST_PACKAGE_NAME \
PACKAGE_NAME \
CERTIFICATE, \
$(eval $(call product-overrides-config,$(var))))
# Macro to use below. $(1) is the name of the partition
define product-build-image-config

View File

@ -150,6 +150,8 @@ $(call add_json_bool, FlattenApex, $(filter true,$(TARGET_
$(call add_json_str, DexpreoptGlobalConfig, $(DEX_PREOPT_CONFIG))
$(call add_json_list, ManifestPackageNameOverrides, $(PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES))
$(call add_json_list, PackageNameOverrides, $(PRODUCT_PACKAGE_NAME_OVERRIDES))
$(call add_json_list, CertificateOverrides, $(PRODUCT_CERTIFICATE_OVERRIDES))
$(call add_json_bool, EnforceSystemCertificate, $(ENFORCE_SYSTEM_CERTIFICATE))
$(call add_json_list, EnforceSystemCertificateWhitelist, $(ENFORCE_SYSTEM_CERTIFICATE_WHITELIST))