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

Commit 9b258417 authored by Yi-Yo Chiang's avatar Yi-Yo Chiang
Browse files

Unconditionally copy the system build.prop into target_files archive

releasetools preconditions requires build metadata defined in
SYSTEM/build.prop even when building a system.img-less product.
Copy the SYSTEM/build.prop into the build artifact archive whenever
possible to make add_img_to_target_files happy.

Bug: 212486689
Bug: 213028932
Test: Dist build a system.img-less product. Product properties are
  read from SYSTEM/build.prop and no build error occurred.
Change-Id: I2ce7f8b8ae981eaf06e2d8d2485b55b4e975caa9
parent 8c861cec
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -4949,6 +4949,10 @@ endef
# image.
ifdef BUILDING_SYSTEM_IMAGE
  $(BUILT_TARGET_FILES_PACKAGE): $(FULL_SYSTEMIMAGE_DEPS)
else
  # releasetools may need the system build.prop even when building a
  # system-image-less product.
  $(BUILT_TARGET_FILES_PACKAGE): $(INSTALLED_BUILD_PROP_TARGET)
endif

ifdef BUILDING_USERDATA_IMAGE
@@ -5195,6 +5199,12 @@ ifdef BUILDING_SYSTEM_IMAGE
	@# Contents of the system image
	$(hide) $(call package_files-copy-root, \
	    $(SYSTEMIMAGE_SOURCE_DIR),$(zip_root)/SYSTEM)
else ifdef INSTALLED_BUILD_PROP_TARGET
	@# Copy the system build.prop even if not building a system image
	@# because add_img_to_target_files may need it to build other partition
	@# images.
	$(hide) mkdir -p "$(zip_root)/SYSTEM"
	$(hide) cp "$(INSTALLED_BUILD_PROP_TARGET)" "$(patsubst $(TARGET_OUT)/%,$(zip_root)/SYSTEM/%,$(INSTALLED_BUILD_PROP_TARGET))"
endif
ifdef BUILDING_USERDATA_IMAGE
	@# Contents of the data image