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

Commit a5fa8981 authored by Anton Hansson's avatar Anton Hansson
Browse files

Don't apply path enforcements for non-full builds.

The installed files lists are wildly inaccurate unless all the
makefiles in the tree have been parsed, so the "redundant whitelist"
computation will be too trigger-happy in this case.

Bug: 111757442
Test: mmm -j system/extras/partition_tools
Test: m out/target/product/generic_arm64/offending-artifacts.txt
Change-Id: Id3a9f61d2366de77cdedf9cb1e4e39f7d18ade6f
parent 7b4b1b15
Loading
Loading
Loading
Loading
+33 −32
Original line number Diff line number Diff line
@@ -977,15 +977,9 @@ endif

ifdef FULL_BUILD
  product_FILES := $(call product-installed-files, $(INTERNAL_PRODUCT))
else
  # We're not doing a full build, and are probably only including
  # a subset of the module makefiles.  Don't try to build any modules
  # requested by the product, because we probably won't have rules
  # to build them.
  product_FILES :=
endif

  # Verify the artifact path requirements made by included products.
  all_offending_files :=
  $(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\
    $(eval requirements := $(PRODUCTS.$(makefile).ARTIFACT_PATH_REQUIREMENTS)) \
    $(eval ### Verify that the product only produces files inside its path requirements.) \
@@ -1016,6 +1010,13 @@ $(foreach makefile,$(ARTIFACT_PATH_REQUIREMENT_PRODUCTS),\
$(PRODUCT_OUT)/offending_artifacts.txt:
	rm -f $@
	$(foreach f,$(sort $(all_offending_files)),echo $(f) >> $@;)
else
  # We're not doing a full build, and are probably only including
  # a subset of the module makefiles.  Don't try to build any modules
  # requested by the product, because we probably won't have rules
  # to build them.
  product_FILES :=
endif

ifeq (0,1)
  $(info product_FILES for $(TARGET_DEVICE) ($(INTERNAL_PRODUCT)):)