From 3d92f57ca0b0dab8098352c776fa03e9205e4b9a Mon Sep 17 00:00:00 2001 From: Adrian DC Date: Sat, 12 May 2018 00:33:52 +0200 Subject: [PATCH] lineage: Isolate LineageOS versions properties for build.prop * Our properties were supposed to go to /system/etc/prop.default after the following commit: "lineage: Move to Google's method of defining system default props" Change-Id: I6cb0e28a7599b010b389cc541015a37010a00f4b * However if BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED is not true, only /default.prop will retain the properties contents of ADDITIONAL_DEFAULT_PROPERTIES and PRODUCT_SYSTEM_DEFAULT_PROPERTIES, and none of our versioning identification was held in the system * Enabling BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED globally would break all properties on devices that handle partitions usually at the device level rather than the kernel due to mounting races * Create a new main_version.mk file to isolate LineageOS properties that define the system's versions identifications, and use the ADDITIONAL_BUILD_PROPERTIES internal build variable to include from build/make through a common vendor main.mk entrypoint Change-Id: I0060141c097b3d14c3710eee1e0caf7110634967 Signed-off-by: Adrian DC --- config/common.mk | 10 ---------- config/lineage_sdk_common.mk | 9 --------- config/main.mk | 2 ++ config/main_version.mk | 19 +++++++++++++++++++ 4 files changed, 21 insertions(+), 19 deletions(-) create mode 100644 config/main.mk create mode 100644 config/main_version.mk diff --git a/config/common.mk b/config/common.mk index 1c20a776..a5b35320 100644 --- a/config/common.mk +++ b/config/common.mk @@ -328,13 +328,6 @@ else endif endif -PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ - ro.lineage.version=$(LINEAGE_VERSION) \ - ro.lineage.releasetype=$(LINEAGE_BUILDTYPE) \ - ro.lineage.build.version=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR) \ - ro.modversion=$(LINEAGE_VERSION) \ - ro.lineagelegal.url=https://lineageos.org/legal - PRODUCT_EXTRA_RECOVERY_KEYS += \ vendor/lineage/build/target/product/security/lineage @@ -365,9 +358,6 @@ ifneq ($(PRODUCT_DEFAULT_DEV_CERTIFICATE),build/target/product/security/testkey) endif endif -PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ - ro.lineage.display.version=$(LINEAGE_DISPLAY_VERSION) - -include $(WORKSPACE)/build_env/image-auto-bits.mk -include vendor/lineage/config/partner_gms.mk diff --git a/config/lineage_sdk_common.mk b/config/lineage_sdk_common.mk index d92ed2d4..38495d62 100644 --- a/config/lineage_sdk_common.mk +++ b/config/lineage_sdk_common.mk @@ -38,12 +38,3 @@ ifndef LINEAGE_PLATFORM_REV # If you are doing a release and this is NOT 0, you are almost certainly doing it wrong LINEAGE_PLATFORM_REV := 0 endif - -# LineageOS Platform SDK Version -PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ - ro.lineage.build.version.plat.sdk=$(LINEAGE_PLATFORM_SDK_VERSION) - -# LineageOS Platform Internal -PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ - ro.lineage.build.version.plat.rev=$(LINEAGE_PLATFORM_REV) - diff --git a/config/main.mk b/config/main.mk new file mode 100644 index 00000000..038a8469 --- /dev/null +++ b/config/main.mk @@ -0,0 +1,2 @@ +# Include LineageOS versions +include vendor/lineage/config/main_version.mk diff --git a/config/main_version.mk b/config/main_version.mk new file mode 100644 index 00000000..96213b08 --- /dev/null +++ b/config/main_version.mk @@ -0,0 +1,19 @@ +# LineageOS System Version +ADDITIONAL_BUILD_PROPERTIES += \ + ro.lineage.version=$(LINEAGE_VERSION) \ + ro.lineage.releasetype=$(LINEAGE_BUILDTYPE) \ + ro.lineage.build.version=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR) \ + ro.modversion=$(LINEAGE_VERSION) \ + ro.lineagelegal.url=https://lineageos.org/legal + +# LineageOS Platform Display Version +ADDITIONAL_BUILD_PROPERTIES += \ + ro.lineage.display.version=$(LINEAGE_DISPLAY_VERSION) + +# LineageOS Platform SDK Version +ADDITIONAL_BUILD_PROPERTIES += \ + ro.lineage.build.version.plat.sdk=$(LINEAGE_PLATFORM_SDK_VERSION) + +# LineageOS Platform Internal Version +ADDITIONAL_BUILD_PROPERTIES += \ + ro.lineage.build.version.plat.rev=$(LINEAGE_PLATFORM_REV)