Merge changes from topic "remove_default_prop" am: 4e0bce688c am: 09dd92a862

Change-Id: If12633a2be57ffbb42d0306193a226164e77e2d4
This commit is contained in:
Treehugger Robot 2020-05-15 02:51:58 +00:00 committed by Automerger Merge Worker
commit 8e8444d4fe
2 changed files with 34 additions and 53 deletions

View file

@ -745,6 +745,9 @@ $(call add-clean-step, rm -rf $(HOST_OUT)/framework/vts10-tradefed.jar)
$(call add-clean-step, rm -rf $(HOST_OUT)/vts/*)
$(call add-clean-step, rm -rf $(HOST_OUT)/framework/vts-tradefed.jar)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/default.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/prop.default)
# ************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
# ************************************************

View file

@ -169,9 +169,9 @@ ifeq ($(BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED), true)
endif
# -----------------------------------------------------------------
# FINAL_VENDOR_DEFAULT_PROPERTIES will be installed in vendor/default.prop if
# FINAL_VENDOR_DEFAULT_PROPERTIES will be installed in vendor/build.prop if
# property_overrides_split_enabled is true. Otherwise it will be installed in
# ROOT/default.prop.
# /default.prop
ifdef BOARD_VNDK_VERSION
ifeq ($(BOARD_VNDK_VERSION),current)
FINAL_VENDOR_DEFAULT_PROPERTIES := ro.vndk.version=$(PLATFORM_VNDK_VERSION)
@ -224,9 +224,6 @@ endif
FINAL_VENDOR_DEFAULT_PROPERTIES := $(call uniq-pairs-by-first-component, \
$(FINAL_VENDOR_DEFAULT_PROPERTIES),=)
# -----------------------------------------------------------------
# prop.default
BUILDINFO_SH := build/make/tools/buildinfo.sh
BUILDINFO_COMMON_SH := build/make/tools/buildinfo_common.sh
POST_PROCESS_PROPS :=$= build/make/tools/post_process_props.py
@ -258,66 +255,39 @@ define generate-common-build-props-with-product-vars-set
bash $(BUILDINFO_COMMON_SH) "$(1)" >> $(2)
endef
ifdef property_overrides_split_enabled
INSTALLED_DEFAULT_PROP_TARGET := $(TARGET_OUT)/etc/prop.default
INSTALLED_DEFAULT_PROP_OLD_TARGET := $(TARGET_ROOT_OUT)/default.prop
ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_DEFAULT_PROP_OLD_TARGET)
$(INSTALLED_DEFAULT_PROP_TARGET): .KATI_IMPLICIT_OUTPUTS := $(INSTALLED_DEFAULT_PROP_OLD_TARGET)
else
# legacy path
INSTALLED_DEFAULT_PROP_TARGET := $(TARGET_ROOT_OUT)/default.prop
endif
ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_DEFAULT_PROP_TARGET)
FINAL_DEFAULT_PROPERTIES := \
$(call collapse-pairs, $(ADDITIONAL_DEFAULT_PROPERTIES)) \
$(call collapse-pairs, $(PRODUCT_SYSTEM_DEFAULT_PROPERTIES))
# Legacy (non-Treble) path
ifndef property_overrides_split_enabled
FINAL_DEFAULT_PROPERTIES += \
$(call collapse-pairs, $(FINAL_VENDOR_DEFAULT_PROPERTIES))
endif
FINAL_DEFAULT_PROPERTIES := $(call uniq-pairs-by-first-component, \
$(FINAL_DEFAULT_PROPERTIES),=)
INSTALLED_LEGACY_DEFAULT_PROP_TARGET := $(TARGET_ROOT_OUT)/default.prop
ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_LEGACY_DEFAULT_PROP_TARGET)
intermediate_system_build_prop := $(call intermediates-dir-for,ETC,system_build_prop)/build.prop
$(INSTALLED_DEFAULT_PROP_TARGET): $(BUILDINFO_COMMON_SH) $(POST_PROCESS_PROPS) $(intermediate_system_build_prop)
$(INSTALLED_LEGACY_DEFAULT_PROP_TARGET): $(BUILDINFO_COMMON_SH) $(POST_PROCESS_PROPS)
@echo Target buildinfo: $@
@mkdir -p $(dir $@)
@rm -f $@
$(hide) echo "#" > $@; \
echo "# ADDITIONAL_DEFAULT_PROPERTIES" >> $@; \
echo "#" >> $@;
$(hide) $(foreach line,$(FINAL_DEFAULT_PROPERTIES), \
$(hide) $(foreach line,$(call uniq-pairs-by-first-component, \
$(call collapse-pairs, $(ADDITIONAL_DEFAULT_PROPERTIES)) \
$(call collapse-pairs, $(PRODUCT_SYSTEM_DEFAULT_PROPERTIES)) \
$(call collapse-pairs, $(FINAL_VENDOR_DEFAULT_PROPERTIES)),=), \
echo "$(line)" >> $@;)
$(hide) $(POST_PROCESS_PROPS) $@
ifdef property_overrides_split_enabled
$(hide) mkdir -p $(TARGET_ROOT_OUT)
$(hide) ln -sf system/etc/prop.default $(INSTALLED_DEFAULT_PROP_OLD_TARGET)
endif
# -----------------------------------------------------------------
# vendor default.prop
INSTALLED_VENDOR_DEFAULT_PROP_TARGET :=
ifdef property_overrides_split_enabled
INSTALLED_VENDOR_DEFAULT_PROP_TARGET := $(TARGET_OUT_VENDOR)/default.prop
ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_VENDOR_DEFAULT_PROP_TARGET)
$(INSTALLED_VENDOR_DEFAULT_PROP_TARGET): $(INSTALLED_DEFAULT_PROP_TARGET) $(POST_PROCESS_PROPS)
@echo Target buildinfo: $@
@mkdir -p $(dir $@)
$(hide) echo "#" > $@; \
echo "# ADDITIONAL VENDOR DEFAULT PROPERTIES" >> $@; \
echo "#" >> $@;
$(hide) $(foreach line,$(FINAL_VENDOR_DEFAULT_PROPERTIES), \
echo "$(line)" >> $@;)
$(hide) $(POST_PROCESS_PROPS) $@
endif # property_overrides_split_enabled
# -----------------------------------------------------------------
# build.prop
intermediate_system_build_prop := $(call intermediates-dir-for,ETC,system_build_prop)/build.prop
INSTALLED_BUILD_PROP_TARGET := $(TARGET_OUT)/build.prop
ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_BUILD_PROP_TARGET)
# TODO(b/117892318) merge DEFAULT into BUILD
ifdef property_overrides_split_enabled
FINAL_DEFAULT_PROPERTIES := \
$(call collapse-pairs, $(ADDITIONAL_DEFAULT_PROPERTIES)) \
$(call collapse-pairs, $(PRODUCT_SYSTEM_DEFAULT_PROPERTIES))
FINAL_DEFAULT_PROPERTIES := $(call uniq-pairs-by-first-component, \
$(FINAL_DEFAULT_PROPERTIES),=)
endif
FINAL_BUILD_PROPERTIES := \
$(call collapse-pairs, $(ADDITIONAL_BUILD_PROPERTIES))
FINAL_BUILD_PROPERTIES := $(call uniq-pairs-by-first-component, \
@ -431,6 +401,10 @@ $(intermediate_system_build_prop): $(BUILDINFO_SH) $(BUILDINFO_COMMON_SH) $(INTE
@echo Target buildinfo: $@
@mkdir -p $(dir $@)
$(hide) rm -f $@ && touch $@
ifdef property_overrides_split_enabled
$(hide) $(foreach line,$(FINAL_DEFAULT_PROPERTIES), \
echo "$(line)" >> $@;)
endif
ifneq ($(PRODUCT_OEM_PROPERTIES),)
$(hide) echo "#" >> $@; \
echo "# PRODUCT_OEM_PROPERTIES" >> $@; \
@ -531,6 +505,10 @@ $(INSTALLED_VENDOR_BUILD_PROP_TARGET): $(BUILDINFO_COMMON_SH) $(POST_PROCESS_PRO
@echo Target vendor buildinfo: $@
@mkdir -p $(dir $@)
$(hide) rm -f $@ && touch $@
ifdef property_overrides_split_enabled
$(hide) $(foreach line,$(FINAL_VENDOR_DEFAULT_PROPERTIES), \
echo "$(line)" >> $@;)
endif
ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS),true)
$(hide) echo ro.boot.dynamic_partitions=true >> $@
endif
@ -2115,8 +2093,7 @@ $(foreach prop,$(1), \
endef
$(INSTALLED_RECOVERY_BUILD_PROP_TARGET): \
$(INSTALLED_DEFAULT_PROP_TARGET) \
$(INSTALLED_VENDOR_DEFAULT_PROP_TARGET) \
$(INSTALLED_LEGACY_DEFAULT_PROP_TARGET) \
$(intermediate_system_build_prop) \
$(INSTALLED_VENDOR_BUILD_PROP_TARGET) \
$(INSTALLED_ODM_BUILD_PROP_TARGET) \
@ -2125,8 +2102,9 @@ $(INSTALLED_RECOVERY_BUILD_PROP_TARGET): \
@echo "Target recovery buildinfo: $@"
$(hide) mkdir -p $(dir $@)
$(hide) rm -f $@
$(hide) cat $(INSTALLED_DEFAULT_PROP_TARGET) > $@
$(hide) cat $(INSTALLED_VENDOR_DEFAULT_PROP_TARGET) >> $@
ifneq (,$(INSTALLED_LEGACY_DEFAULT_PROP_TARGET))
$(hide) cat $(INSTALLED_LEGACY_DEFAULT_PROP_TARGET) > $@
endif
$(hide) cat $(intermediate_system_build_prop) >> $@
$(hide) cat $(INSTALLED_VENDOR_BUILD_PROP_TARGET) >> $@
$(hide) cat $(INSTALLED_ODM_BUILD_PROP_TARGET) >> $@