From f68b4c67d76e5c72ac1b866c6e7b6a6cc73e3907 Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Thu, 4 Jan 2018 09:46:48 -0800 Subject: [PATCH] Use property_info_checker instead of checkfc and fc_sort for properties 1) fc_sort is not needed as there is no reason to sort system properties, so this is removed and replaced with a simply copy 2) Use the new property_info_checker instead of checkfc for validating property information. This supports exact match properties and will be extended to verify property schemas in the future. Bug: 36001741 Test: verify bullhead's property contexts correct Test: verify faulty property contexts result in failures Change-Id: Id9bbf401f385206e6907449a510e3111424ce59e --- Android.mk | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Android.mk b/Android.mk index 409ffa086..ba99f598b 100644 --- a/Android.mk +++ b/Android.mk @@ -889,12 +889,10 @@ $(plat_property_contexts.tmp): PRIVATE_ADDITIONAL_M4DEFS := $(LOCAL_ADDITIONAL_M $(plat_property_contexts.tmp): $(plat_pcfiles) @mkdir -p $(dir $@) $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_PC_FILES) > $@ -$(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) -$(LOCAL_BUILT_MODULE): PRIVATE_FC_SORT := $(HOST_OUT_EXECUTABLES)/fc_sort -$(LOCAL_BUILT_MODULE): $(plat_property_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc $(HOST_OUT_EXECUTABLES)/fc_sort +$(LOCAL_BUILT_MODULE): $(plat_property_contexts.tmp) $(HOST_OUT_EXECUTABLES)/property_info_checker @mkdir -p $(dir $@) - $(hide) $(PRIVATE_FC_SORT) $< $@ - $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -p $(PRIVATE_SEPOLICY) $@ + $(hide) cp -f $< $@ + $(hide) $(HOST_OUT_EXECUTABLES)/property_info_checker $@ built_plat_pc := $(LOCAL_BUILT_MODULE) plat_pcfiles := @@ -924,12 +922,10 @@ $(nonplat_property_contexts.tmp): $(nonplat_pcfiles) $(hide) m4 -s $(PRIVATE_ADDITIONAL_M4DEFS) $(PRIVATE_PC_FILES) > $@ -$(LOCAL_BUILT_MODULE): PRIVATE_SEPOLICY := $(built_sepolicy) -$(LOCAL_BUILT_MODULE): PRIVATE_FC_SORT := $(HOST_OUT_EXECUTABLES)/fc_sort -$(LOCAL_BUILT_MODULE): $(nonplat_property_contexts.tmp) $(built_sepolicy) $(HOST_OUT_EXECUTABLES)/checkfc $(HOST_OUT_EXECUTABLES)/fc_sort +$(LOCAL_BUILT_MODULE): $(nonplat_property_contexts.tmp) $(HOST_OUT_EXECUTABLES)/property_info_checker @mkdir -p $(dir $@) - $(hide) $(PRIVATE_FC_SORT) $< $@ - $(hide) $(HOST_OUT_EXECUTABLES)/checkfc -p $(PRIVATE_SEPOLICY) $@ + $(hide) cp -f $< $@ + $(hide) $(HOST_OUT_EXECUTABLES)/property_info_checker $@ built_nonplat_pc := $(LOCAL_BUILT_MODULE) nonplat_pcfiles :=