aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpandan Das <spandandas@google.com>2024-02-20 07:48:22 +0000
committerSpandan Das <spandandas@google.com>2024-03-21 18:04:25 +0000
commitb20d060c3c4d21c433609a4a6d1521adc698a2ac (patch)
tree71da42f28d84086a17df67568c76ab5d8d21208a
parentafac5b33ac8f6e170a820577f1cadf443df75d7d (diff)
downloadbuild-b20d060c3c4d21c433609a4a6d1521adc698a2ac.tar.gz
Convert BuildIgnoreApexContritbutions variable to a boolean
The ignore list is burdensome to maintain once we start adding the module sdk contents to apex_contributions. Convert the variable to a boolean. When set to true, all contents in `apex_contributions` will be ignored Bug: 308187268 Test: m nothing on aosp,google and google_fullmte devices Ignore-AOSP-first: CL topic does a cleanup of an internal only denylist Change-Id: If899f6eaf5449c2aa789d0bd5b791a3db715c676 Merged-In: If899f6eaf5449c2aa789d0bd5b791a3db715c676 (cherry picked from commit 025492c4ea092b7f25a4d442e67143954b5ffaa5)
-rw-r--r--core/product.mk2
-rw-r--r--core/product_config.mk17
-rw-r--r--core/soong_config.mk2
3 files changed, 19 insertions, 2 deletions
diff --git a/core/product.mk b/core/product.mk
index d64dde2c68..39c350571f 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -457,7 +457,7 @@ _product_list_vars += PRODUCT_VALIDATION_CHECKS
_product_single_value_vars += PRODUCT_BUILD_FROM_SOURCE_STUB
-_product_list_vars += PRODUCT_BUILD_IGNORE_APEX_CONTRIBUTION_CONTENTS
+_product_single_value_vars += PRODUCT_BUILD_IGNORE_APEX_CONTRIBUTION_CONTENTS
_product_single_value_vars += PRODUCT_HIDDEN_API_EXPORTABLE_STUBS
diff --git a/core/product_config.mk b/core/product_config.mk
index 4525423b4f..2ed292c18e 100644
--- a/core/product_config.mk
+++ b/core/product_config.mk
@@ -301,6 +301,23 @@ ifeq (, $(PRODUCT_INCLUDE_TAGS))
PRODUCT_INCLUDE_TAGS += com.android.mainline mainline_module_prebuilt_nightly
endif
+# AOSP and Google products currently share the same `apex_contributions` in next.
+# This causes issues when building <aosp_product>-next-userdebug in main.
+# Create a temporary allowlist to ignore the google apexes listed in `contents` of apex_contributions of `next`
+# *for aosp products*.
+# TODO(b/308187268): Remove this denylist mechanism
+# Use PRODUCT_PACKAGES to determine if this is an aosp product. aosp products do not use google signed apexes.
+ignore_apex_contributions :=
+ifeq (,$(findstring com.google.android.conscrypt,$(PRODUCT_PACKAGES)))
+ ignore_apex_contributions := true
+endif
+ifeq (true,$(PRODUCT_MODULE_BUILD_FROM_SOURCE))
+ ignore_apex_contributions := true
+endif
+ifeq (true, $(ignore_apex_contributions))
+PRODUCT_BUILD_IGNORE_APEX_CONTRIBUTION_CONTENTS := true
+endif
+
#############################################################################
# Quick check and assign default values
diff --git a/core/soong_config.mk b/core/soong_config.mk
index d4c56e5707..3987f66ce1 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -335,7 +335,7 @@ $(call add_json_bool, KeepVndk, $(filter true,$(KEEP_VNDK)))
$(call add_json_bool, CheckVendorSeappViolations, $(filter true,$(CHECK_VENDOR_SEAPP_VIOLATIONS)))
-$(call add_json_list, BuildIgnoreApexContributionContents, $(sort $(PRODUCT_BUILD_IGNORE_APEX_CONTRIBUTION_CONTENTS)))
+$(call add_json_bool, BuildIgnoreApexContributionContents, $(PRODUCT_BUILD_IGNORE_APEX_CONTRIBUTION_CONTENTS))
$(call add_json_map, PartitionVarsForBazelMigrationOnlyDoNotUse)
$(call add_json_str, ProductDirectory, $(dir $(INTERNAL_PRODUCT)))