Merge "Move dep on PRODUCT_COPY_FILES to main.mk" into stage-aosp-master
This commit is contained in:
committed by
Android (Google) Code Review
commit
e640df81d2
@@ -39,7 +39,6 @@ $(foreach cf,$(unique_product_copy_files_pairs), \
|
||||
$(if $(filter init%rc,$(notdir $(_dest)))$(filter %/etc/init,$(dir $(_dest))),\
|
||||
$(eval $(call copy-init-script-file-checked,$(_src),$(_fulldest))),\
|
||||
$(eval $(call copy-one-file,$(_src),$(_fulldest)))))) \
|
||||
$(eval ALL_DEFAULT_INSTALLED_MODULES += $(_fulldest)) \
|
||||
$(eval unique_product_copy_files_destinations += $(_dest))))
|
||||
|
||||
# Dump a list of overriden (and ignored PRODUCT_COPY_FILES entries)
|
||||
|
31
core/main.mk
31
core/main.mk
@@ -905,7 +905,18 @@ $(if $(_erm_new_modules),$(eval $(1) += $(_erm_new_modules))\
|
||||
$(call expand-required-modules,$(1),$(_erm_new_modules)))
|
||||
endef
|
||||
|
||||
# Determines the files a particular product installs.
|
||||
# Transforms paths relative to PRODUCT_OUT to absolute paths.
|
||||
# $(1): list of relative paths
|
||||
# $(2): optional suffix to append to paths
|
||||
define resolve-product-relative-paths
|
||||
$(subst $(_vendor_path_placeholder),$(TARGET_COPY_OUT_VENDOR),\
|
||||
$(subst $(_product_path_placeholder),$(TARGET_COPY_OUT_PRODUCT),\
|
||||
$(foreach p,$(1),$(call append-path,$(PRODUCT_OUT),$(p)$(2)))))
|
||||
endef
|
||||
|
||||
# Lists most of the files a particular product installs, including:
|
||||
# - PRODUCT_PACKAGES, and their LOCAL_REQUIRED_MODULES
|
||||
# - PRODUCT_COPY_FILES
|
||||
# The base list of modules to build for this product is specified
|
||||
# by the appropriate product definition file, which was included
|
||||
# by product_config.mk.
|
||||
@@ -919,7 +930,8 @@ endef
|
||||
# 32-bit variant, if it exits. See the select-bitness-of-required-modules definition.
|
||||
# $(1): product makefile
|
||||
define product-installed-files
|
||||
$(eval _pif_modules := $(PRODUCTS.$(strip $(1)).PRODUCT_PACKAGES)) \
|
||||
$(eval _mk := $(strip $(1))) \
|
||||
$(eval _pif_modules := $(PRODUCTS.$(_mk).PRODUCT_PACKAGES)) \
|
||||
$(if $(BOARD_VNDK_VERSION),$(eval _pif_modules += vndk_package)) \
|
||||
$(eval ### Filter out the overridden packages and executables before doing expansion) \
|
||||
$(eval _pif_overrides := $(foreach p, $(_pif_modules), $(PACKAGES.$(p).OVERRIDES))) \
|
||||
@@ -936,7 +948,9 @@ define product-installed-files
|
||||
$(eval _pif_modules += $(call get-32-bit-modules, $(_pif_modules_rest))) \
|
||||
$(eval _pif_modules += $(_pif_modules_rest)) \
|
||||
$(call expand-required-modules,_pif_modules,$(_pif_modules)) \
|
||||
$(call module-installed-files, $(_pif_modules))
|
||||
$(call module-installed-files, $(_pif_modules)) \
|
||||
$(call resolve-product-relative-paths,\
|
||||
$(foreach cf,$(PRODUCTS.$(_mk).PRODUCT_COPY_FILES),$(call word-colon,2,$(cf))))
|
||||
endef
|
||||
|
||||
# Fails the build if the given list is non-empty, and prints it entries (stripping PRODUCT_OUT).
|
||||
@@ -975,15 +989,6 @@ else
|
||||
product_FILES :=
|
||||
endif
|
||||
|
||||
# Transforms paths relative to PRODUCT_OUT to absolute paths.
|
||||
# $(1): list of relative paths
|
||||
# $(2): optional suffix to append to paths
|
||||
define resolve-product-relative-paths
|
||||
$(subst $(_vendor_path_placeholder),$(TARGET_COPY_OUT_VENDOR),\
|
||||
$(subst $(_product_path_placeholder),$(TARGET_COPY_OUT_PRODUCT),\
|
||||
$(foreach p,$(1),$(PRODUCT_OUT)/$(p)$(2))))
|
||||
endef
|
||||
|
||||
# Verify the artifact path requirements made by included products.
|
||||
$(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\
|
||||
$(eval requirements := $(PRODUCTS.$(makefile).ARTIFACT_PATH_REQUIREMENTS)) \
|
||||
@@ -992,8 +997,6 @@ $(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\
|
||||
$(eval path_patterns := $(call resolve-product-relative-paths,$(requirements),%)) \
|
||||
$(eval whitelist_patterns := $(call resolve-product-relative-paths,$(whitelist))) \
|
||||
$(eval files := $(call product-installed-files, $(makefile))) \
|
||||
$(eval files += $(foreach cf,$(PRODUCTS.$(makefile).PRODUCT_COPY_FILES),\
|
||||
$(call append-path,$(PRODUCT_OUT),$(call word-colon,2,$(cf))))) \
|
||||
$(eval files := $(filter-out $(TARGET_OUT_FAKE)/% $(HOST_OUT)/%,$(files))) \
|
||||
$(eval offending_files := $(filter-out $(path_patterns) $(whitelist_patterns),$(files))) \
|
||||
$(call maybe-print-list-and-error,$(offending_files),$(makefile) produces files outside its artifact path requirement.) \
|
||||
|
@@ -25,5 +25,6 @@ PRODUCT_SHIPPING_API_LEVEL := 28
|
||||
|
||||
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true
|
||||
PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST := \
|
||||
root/init.zygote64_32.rc \
|
||||
system/etc/seccomp_policy/crash_dump.arm.policy \
|
||||
system/etc/seccomp_policy/mediacodec.policy \
|
||||
|
Reference in New Issue
Block a user