Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acbff33d authored by Anton Hansson's avatar Anton Hansson Committed by android-build-merger
Browse files

Merge "Add support enforcing all path requirements." am: 9d2c04e3 am: a062b90c

am: e31772e5

Change-Id: I0cb17b380782968176c988ee9b576776a370c879
parents ae886cd7 e31772e5
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -969,6 +969,17 @@ $(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\
  $(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.) \
  $(eval ### Optionally verify that nothing else produces files inside this artifact path requirement.) \
  $(if $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS),\
    $(eval extra_files := $(filter-out $(files) $(HOST_OUT)/%,$(product_FILES))) \
    $(eval whitelist := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST)) \
    $(eval whitelist_patterns := $(call resolve-product-relative-paths,$(whitelist))) \
    $(eval files_in_requirement := $(filter $(path_patterns),$(extra_files))) \
    $(eval offending_files := $(filter-out $(whitelist_patterns),$(files_in_requirement))) \
    $(call maybe-print-list-and-error,$(offending_files),$(INTERNAL_PRODUCT) produces files inside $(makefile)s artifact path requirement.) \
    $(eval unused_whitelist := $(filter-out $(extra_files),$(whitelist_patterns))) \
    $(call maybe-print-list-and-error,$(unused_whitelist),$(INTERNAL_PRODUCT) includes redundant artifact path requirement whitelist entries.) \
  ) \
)

ifeq (0,1)
+2 −0
Original line number Diff line number Diff line
@@ -198,6 +198,8 @@ _product_var_list := \
    PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE \
    PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE \
    PRODUCT_USE_LOGICAL_PARTITIONS \
    PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS \
    PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST \

define dump-product
$(info ==== $(1) ====)\