Merge "Re-submit "Add trailing slash to mainline path claims.""
am: 471a45b952
Change-Id: I99cb86a27887df6d2bf0cb922621c7c52e35aa39
This commit is contained in:
commit
e7334299df
2 changed files with 15 additions and 6 deletions
17
core/main.mk
17
core/main.mk
|
@ -1012,6 +1012,18 @@ ifdef FULL_BUILD
|
|||
product_FILES := $(call product-installed-files, $(INTERNAL_PRODUCT))
|
||||
|
||||
# Verify the artifact path requirements made by included products.
|
||||
|
||||
# Fakes don't get installed, and host files are irrelevant.
|
||||
static_whitelist_patterns := $(TARGET_OUT_FAKE)/% $(HOST_OUT)/%
|
||||
# RROs become REQUIRED by the source module, but are always placed on the vendor partition.
|
||||
static_whitelist_patterns += %__auto_generated_rro.apk
|
||||
ifeq (true,$(BOARD_USES_SYSTEM_OTHER_ODEX))
|
||||
# Allow system_other odex space optimization.
|
||||
static_whitelist_patterns += \
|
||||
$(TARGET_OUT_SYSTEM_OTHER)/%.odex \
|
||||
$(TARGET_OUT_SYSTEM_OTHER)/%.vdex \
|
||||
$(TARGET_OUT_SYSTEM_OTHER)/%.art
|
||||
endif
|
||||
all_offending_files :=
|
||||
$(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\
|
||||
$(eval requirements := $(PRODUCTS.$(makefile).ARTIFACT_PATH_REQUIREMENTS)) \
|
||||
|
@ -1020,10 +1032,7 @@ ifdef FULL_BUILD
|
|||
$(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 := $(filter-out $(TARGET_OUT_FAKE)/% $(HOST_OUT)/%,$(files))) \
|
||||
$(eval # RROs become REQUIRED by the source module, but are always placed on the vendor partition.) \
|
||||
$(eval files := $(filter-out %__auto_generated_rro.apk,$(files))) \
|
||||
$(eval offending_files := $(filter-out $(path_patterns) $(whitelist_patterns),$(files))) \
|
||||
$(eval offending_files := $(filter-out $(path_patterns) $(whitelist_patterns) $(static_whitelist_patterns),$(files))) \
|
||||
$(call maybe-print-list-and-error,$(offending_files),$(makefile) produces files outside its artifact path requirement.) \
|
||||
$(eval unused_whitelist := $(filter-out $(files),$(whitelist_patterns))) \
|
||||
$(call maybe-print-list-and-error,$(unused_whitelist),$(makefile) includes redundant whitelist entries in its artifact path requirement.) \
|
||||
|
|
|
@ -76,7 +76,7 @@ _my_whitelist := $(_base_mk_whitelist)
|
|||
|
||||
# Both /system and / are in system.img when PRODUCT_SHIPPING_API_LEVEL>=28.
|
||||
_my_paths := \
|
||||
$(TARGET_COPY_OUT_ROOT) \
|
||||
$(TARGET_COPY_OUT_SYSTEM) \
|
||||
$(TARGET_COPY_OUT_ROOT)/ \
|
||||
$(TARGET_COPY_OUT_SYSTEM)/ \
|
||||
|
||||
$(call require-artifacts-in-path, $(_my_paths), $(_my_whitelist))
|
||||
|
|
Loading…
Reference in a new issue