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

Commit 359f421d authored by Colin Cross's avatar Colin Cross
Browse files

Make installed-files-recovery.txt depend on rsync timestamp

Files are copied into the recovery installation directory by a rule
that runs rsync.  The previous logic tried to avoid racing with the
rsync rule by depending on the final packaged recovery image, but
if BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT is set then
INSTALLED_RECOVERYIMAGE_TARGET is left empty and no dependency was
added.  Depend on the timestamp file used as the output of the rule
that runs rsync instead.

Test: query dependencies of installed-files-recovery.txt
Fixes: 173772240
Change-Id: I5ec77a6933e3a83fe4e4819e0e246017d824d8a5
parent f4b637a2
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -1666,16 +1666,15 @@ INTERNAL_RECOVERYIMAGE_FILES := $(filter $(TARGET_RECOVERY_OUT)/%, \
INSTALLED_FILES_FILE_RECOVERY := $(PRODUCT_OUT)/installed-files-recovery.txt
INSTALLED_FILES_JSON_RECOVERY := $(INSTALLED_FILES_FILE_RECOVERY:.txt=.json)

ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
INSTALLED_BOOTIMAGE_TARGET := $(BUILT_BOOTIMAGE_TARGET)
endif

# TODO(b/30414428): Can't depend on INTERNAL_RECOVERYIMAGE_FILES alone like other
# INSTALLED_FILES_FILE_* rules. Because currently there're cp/rsync/rm commands in
# build-recoveryimage-target, which would touch the files under TARGET_RECOVERY_OUT and race with
# the call to FILELIST.
ifeq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
INSTALLED_BOOTIMAGE_TARGET := $(BUILT_BOOTIMAGE_TARGET)
$(INSTALLED_FILES_FILE_RECOVERY): $(INSTALLED_BOOTIMAGE_TARGET)
else
$(INSTALLED_FILES_FILE_RECOVERY): $(INSTALLED_RECOVERYIMAGE_TARGET)
endif
$(INSTALLED_FILES_FILE_RECOVERY): $(INTERNAL_RECOVERY_RAMDISK_FILES_TIMESTAMP)

$(INSTALLED_FILES_FILE_RECOVERY): .KATI_IMPLICIT_OUTPUTS := $(INSTALLED_FILES_JSON_RECOVERY)
$(INSTALLED_FILES_FILE_RECOVERY): $(INTERNAL_RECOVERYIMAGE_FILES) $(FILESLIST) $(FILESLIST_UTIL)