From f3b0dc290e10cf69204fb8e1a320805a4aff60b2 Mon Sep 17 00:00:00 2001 From: Patrick Tjin Date: Fri, 13 May 2016 15:26:09 -0700 Subject: [PATCH] Makefile: exclude cache symlink on devices with no cache partition rsync will complain due to broken cache symlink on devices without cache partition when creating the recovery disk. Recovery does not depend on /cache. Bug: 28747374 Change-Id: Ie2dc6e84194fbc3bbb39fe59ef92a6e8936b71e2 --- core/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/Makefile b/core/Makefile index f3770516d2..1972dc1d27 100644 --- a/core/Makefile +++ b/core/Makefile @@ -944,7 +944,7 @@ define build-recoveryimage-target $(hide) mkdir -p $(TARGET_RECOVERY_OUT) $(hide) mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/etc $(TARGET_RECOVERY_ROOT_OUT)/sdcard $(TARGET_RECOVERY_ROOT_OUT)/tmp @echo Copying baseline ramdisk... - $(hide) rsync -a --exclude=etc --exclude=sdcard $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT) # "cp -Rf" fails to overwrite broken symlinks on Mac. + $(hide) rsync -a --exclude=etc --exclude=sdcard $(IGNORE_CACHE_LINK) $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT) # "cp -Rf" fails to overwrite broken symlinks on Mac. @echo Modifying ramdisk contents... $(hide) rm -f $(TARGET_RECOVERY_ROOT_OUT)/init*.rc $(hide) cp -f $(recovery_initrc) $(TARGET_RECOVERY_ROOT_OUT)/ @@ -1391,6 +1391,9 @@ $(INSTALLED_CACHEIMAGE_TARGET): $(INTERNAL_USERIMAGES_DEPS) $(INTERNAL_CACHEIMAG cacheimage-nodeps: | $(INTERNAL_USERIMAGES_DEPS) $(build-cacheimage-target) +else # BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE +# we need to ignore the broken cache link when doing the rsync +IGNORE_CACHE_LINK := --exclude=cache endif # BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE