From bdf3474394e193bdb1d6536c58af94f8771f110b Mon Sep 17 00:00:00 2001 From: Aaron Kling Date: Fri, 3 Jan 2025 02:40:11 -0600 Subject: [PATCH] fixup! Reland: Verify init scripts for correctness during build The dir macro returns the path with a trailing slash. The copy-files and prebuilt filter checks for files in the etc/init directory did not have a trailing slash in the comparison string. Change-Id: If56e283ac33784514d4b715bb25d48c044c904cc --- core/Makefile | 2 +- core/misc_prebuilt_internal.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/Makefile b/core/Makefile index 9dc3b2f02b..025f3833f9 100644 --- a/core/Makefile +++ b/core/Makefile @@ -169,7 +169,7 @@ $(foreach cf,$(unique_product_copy_files_pairs), \ $(eval $(call copy-xml-file-checked,$(_src),$(_fulldest))),\ $(if $(and $(filter %.jar,$(_dest)),$(filter $(basename $(notdir $(_dest))),$(PRODUCT_LOADED_BY_PRIVILEGED_MODULES))),\ $(eval $(call copy-and-uncompress-dexs,$(_src),$(_fulldest))), \ - $(if $(filter init%rc,$(notdir $(_dest)))$(filter %/etc/init,$(dir $(_dest))),\ + $(if $(filter init%rc,$(notdir $(_dest)))$(filter %/etc/init/,$(dir $(_dest))),\ $(eval $(call copy-init-script-file-checked,$(_src),$(_fulldest))),\ $(if $(and $(filter true,$(check_elf_prebuilt_product_copy_files)), \ $(filter bin lib lib64,$(subst /,$(space),$(_dest)))), \ diff --git a/core/misc_prebuilt_internal.mk b/core/misc_prebuilt_internal.mk index a56220772c..b14b9ce032 100644 --- a/core/misc_prebuilt_internal.mk +++ b/core/misc_prebuilt_internal.mk @@ -25,7 +25,7 @@ endif include $(BUILD_SYSTEM)/base_rules.mk -ifneq ($(filter init%rc,$(notdir $(LOCAL_INSTALLED_MODULE)))$(filter %/etc/init,$(dir $(LOCAL_INSTALLED_MODULE))),) +ifneq ($(filter init%rc,$(notdir $(LOCAL_INSTALLED_MODULE)))$(filter %/etc/init/,$(dir $(LOCAL_INSTALLED_MODULE))),) $(eval $(call copy-init-script-file-checked,$(my_prebuilt_src_file),$(LOCAL_BUILT_MODULE))) else $(LOCAL_BUILT_MODULE) : $(my_prebuilt_src_file)