From 075d9622ff6265f884818ab02e5629a0e3375260 Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Mon, 21 Aug 2023 11:47:39 -0700 Subject: [PATCH] Ignore vndk compat symlinks in artifact path requirements A change is being made to properly track apex compat symlinks in the installation logic, which causes the artifact path requirements to start complaining about them. Exclude them from the artifact path requirements. Bug: 205632228 Test: m nothing Change-Id: Ie975b7450574d41bb13bb2179edc31ba4edd413e --- core/base_rules.mk | 3 +++ core/main.mk | 6 ++++-- target/product/gsi_release.mk | 9 +++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index e7c28ec847..b3c5b946fa 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -965,6 +965,9 @@ ifneq (,$(LOCAL_SOONG_INSTALLED_MODULE)) $(my_init_rc_installed) \ $(my_installed_test_data) \ $(my_vintf_installed)) + + ALL_MODULES.$(my_register_name).INSTALLED_SYMLINKS := $(LOCAL_SOONG_INSTALL_SYMLINKS) + # Store the list of colon-separated pairs of the built and installed locations # of files provided by this module. Used by custom packaging rules like # package-modules.mk that need to copy the built files to a custom install diff --git a/core/main.mk b/core/main.mk index 5738cdb78b..12b7bd0105 100644 --- a/core/main.mk +++ b/core/main.mk @@ -1720,8 +1720,10 @@ else ifneq ($(TARGET_BUILD_APPS),) unbundled_build_modules := $(sort $(TARGET_BUILD_APPS)) endif - # Dist the installed files if they exist. - apps_only_installed_files := $(foreach m,$(unbundled_build_modules),$(ALL_MODULES.$(m).INSTALLED)) + # Dist the installed files if they exist, except the installed symlinks. dist-for-goals emits + # `cp src dest` commands, which will fail to copy dangling symlinks. + apps_only_installed_files := $(foreach m,$(unbundled_build_modules),\ + $(filter-out $(ALL_MODULES.$(m).INSTALLED_SYMLINKS),$(ALL_MODULES.$(m).INSTALLED))) $(call dist-for-goals,apps_only, $(apps_only_installed_files)) # Dist the bundle files if they exist. diff --git a/target/product/gsi_release.mk b/target/product/gsi_release.mk index e39af92ae5..bd85b9f51e 100644 --- a/target/product/gsi_release.mk +++ b/target/product/gsi_release.mk @@ -28,10 +28,15 @@ BUILDING_GSI := true -# Exclude all files under system/product and system/system_ext +# Exclude all files under system/product and system/system_ext, +# and the vndk apex's compat symlinks PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ system/product/% \ - system/system_ext/% + system/system_ext/% \ + system/lib/vndk-29 \ + system/lib/vndk-sp-29 \ + system/lib64/vndk-29 \ + system/lib64/vndk-sp-29 # GSI should always support up-to-date platform features. # Keep this value at the latest API level to ensure latest build system