Fix non-existing modules check
This variable was accidentally changed to refer to the
shorthand PRODUCT_XYZ instead of PRODUCTS.<mk>.PRODUCT_XYZ
in a previous mass-migration, but that shorthand didn't
exist for these variables. Add it in.
Also whitelist the offender introduced since it was broken.
Test: lunch generic; m nothing
Change-Id: I29dd73c29796743e770afa0c2ceb4f8583dc6e1e
diff --git a/core/product.mk b/core/product.mk
index 838673c..9ec3257 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -541,10 +541,15 @@
endef
#
-# Strip the variables in _product_strip_var_list
+# Strip the variables in _product_var_list and a few build-system
+# internal variables, and assign the ones for the current product
+# to a shorthand that is more convenient to read from elsewhere.
#
define strip-product-vars
-$(foreach v,$(_product_var_list), \
+$(foreach v,\
+ $(_product_var_list) \
+ PRODUCT_ENFORCE_PACKAGES_EXIST \
+ PRODUCT_ENFORCE_PACKAGES_EXIST_WHITELIST, \
$(eval $(v) := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).$(v)))) \
)
endef
diff --git a/target/product/generic.mk b/target/product/generic.mk
index 6fe4818..68130e3 100644
--- a/target/product/generic.mk
+++ b/target/product/generic.mk
@@ -25,4 +25,5 @@
PRODUCT_DEVICE := generic
PRODUCT_NAME := generic
-$(call enforce-product-packages-exist,)
+whitelist := product_manifest.xml
+$(call enforce-product-packages-exist,$(whitelist))
diff --git a/target/product/mainline_arm64.mk b/target/product/mainline_arm64.mk
index 6050924..c098c9f 100644
--- a/target/product/mainline_arm64.mk
+++ b/target/product/mainline_arm64.mk
@@ -16,7 +16,8 @@
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline.mk)
-$(call enforce-product-packages-exist,)
+whitelist := product_manifest.xml
+$(call enforce-product-packages-exist,$(whitelist))
PRODUCT_NAME := mainline_arm64
PRODUCT_DEVICE := mainline_arm64