Workaround for existing packages check failure when the `generic`
product is used with ART prebuilts.

The prebuilt packages in packages/modules/ArtPrebuilt don't get
Android.mk entries in the `generic` product (as opposed to e.g.
`aosp_arm`), so the enforce-product-packages-exist check fails there.

Exclude the ART APEX modules from the check as a workaround. It's also
necessary to remove the check for superfluous allow list entries, since
which modules are actually missing depends on many other variables (see
runtime_libart.mk).

Test: m nothing TARGET_PRODUCT=generic \
      SOONG_CONFIG_art_module_source_build=false
Bug: 172480615
Bug: 182105280
Change-Id: Id67278615f3e7c64c7658bbf1b2aa71ed6b381da
diff --git a/core/main.mk b/core/main.mk
index efa6031..f6dbd9d 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1258,8 +1258,10 @@
         $(if $(or $(ALL_MODULES.$(m).PATH),$(call get-modules-for-2nd-arch,TARGET,$(m))),,$(m)))
       $(call maybe-print-list-and-error,$(filter-out $(_allow_list),$(_nonexistent_modules)),\
         $(INTERNAL_PRODUCT) includes non-existent modules in PRODUCT_PACKAGES)
-      $(call maybe-print-list-and-error,$(filter-out $(_nonexistent_modules),$(_allow_list)),\
-        $(INTERNAL_PRODUCT) includes redundant allow list entries for non-existent PRODUCT_PACKAGES)
+      # TODO(b/182105280): Consider re-enabling this check when the ART modules
+      # have been cleaned up from the allowed_list in target/product/generic.mk.
+      #$(call maybe-print-list-and-error,$(filter-out $(_nonexistent_modules),$(_allow_list)),\
+      #  $(INTERNAL_PRODUCT) includes redundant allow list entries for non-existent PRODUCT_PACKAGES)
     endif
 
     # Check to ensure that all modules in PRODUCT_HOST_PACKAGES exist