Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58c1b042 authored by Hung-ying Tyan's avatar Hung-ying Tyan
Browse files

Fix potential build break

When BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED is enabled, the build system
may attempt to create a symlink in TARGET_ROOT_OUT before TARGET_ROOT_OUT
is created. Also make the symbolic link depend on
INSTALLED_DEFAULT_PROP_TARGET so that the symbolic link is properly created
when only bootimage is made.

Bug: 63645797
Test: on non-A/B device, make installclean && make bootimag and then verify
      that the symbolic link exists at $(TARGET_ROOT_OUT)/default.prop
Change-Id: Id12916b465ff052e2594b79f28274be20ca53af7
Merged-In: I1a9a2ba49c8252afc13ced3dea71253afbd3091e
parent d665b020
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -81,6 +81,9 @@ endif
# prop.default
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_OLD_TARGET): $(INSTALLED_DEFAULT_PROP_TARGET)
else
# legacy path
INSTALLED_DEFAULT_PROP_TARGET := $(TARGET_ROOT_OUT)/default.prop
@@ -114,7 +117,8 @@ $(INSTALLED_DEFAULT_PROP_TARGET): $(intermediate_system_build_prop)
	$(hide) echo ro.bootimage.build.fingerprint="$(BUILD_FINGERPRINT_FROM_FILE)">>$@
	$(hide) build/tools/post_process_props.py $@
ifdef property_overrides_split_enabled
	$(hide) ln -sf system/etc/prop.default $(TARGET_ROOT_OUT)/default.prop
	$(hide) mkdir -p $(TARGET_ROOT_OUT)
	$(hide) ln -sf system/etc/prop.default $(INSTALLED_DEFAULT_PROP_OLD_TARGET)
endif

# -----------------------------------------------------------------