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

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

Improve error message for artifacts outside requirement

Print the allowed paths as part of the error message.

Test: m
Change-Id: Ieb6303f39260ce83232b1c9a0a30e8cac76e2c9c
parent 30648c3a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1353,7 +1353,9 @@ $(call dist-for-goals,droidcore,$(CERTIFICATE_VIOLATION_MODULES_FILENAME))
    $(eval whitelist_patterns := $(call resolve-product-relative-paths,$(whitelist))) \
    $(eval files := $(call product-installed-files, $(makefile))) \
    $(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.) \
    $(call maybe-print-list-and-error,$(offending_files),\
      $(makefile) produces files outside its artifact path requirement. \
      Allowed paths are $(subst $(space),$(comma)$(space),$(addsuffix *,$(requirements)))) \
    $(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.) \