Address syntax / error case nits

Observe some best practices in the APEX symlink
shell commands. No functional changes intended except with error
handling.

Bug: 128687472
Bug: 124106384
Bug: 122985829
Bug: 128249030
Test: make installclean / make droid / inspect one symlink
Change-Id: I099fed5ac8f25cc3911ce0e7ea2b9f74c2172193
This commit is contained in:
Neil Fuller 2019-03-15 19:00:36 +00:00
parent 0e5b74deff
commit 3b0da85b22
1 changed files with 4 additions and 4 deletions

View File

@ -220,10 +220,10 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)
# A symlink can't overwrite a directory and the /system/usr/icu directory once
# existed so the required structure must be created whatever we find.
LOCAL_POST_INSTALL_CMD = mkdir -p $(TARGET_OUT)/usr && rm -rf $(TARGET_OUT)/usr/icu
LOCAL_POST_INSTALL_CMD += ; ln -sf /apex/com.android.runtime/etc/icu $(TARGET_OUT)/usr/icu
LOCAL_POST_INSTALL_CMD += && ln -sf /apex/com.android.runtime/etc/icu $(TARGET_OUT)/usr/icu
# TODO(b/124106384): Clean up compat symlinks for ART binaries.
ART_BINARIES= \
ART_BINARIES := \
dalvikvm \
dalvikvm32 \
dalvikvm64 \
@ -235,10 +235,10 @@ ART_BINARIES= \
oatdump \
profman \
LOCAL_POST_INSTALL_CMD += ; mkdir -p $(TARGET_OUT)/bin
LOCAL_POST_INSTALL_CMD += && mkdir -p $(TARGET_OUT)/bin
$(foreach b,$(ART_BINARIES), \
$(eval LOCAL_POST_INSTALL_CMD += \
; ln -sf /apex/com.android.runtime/bin/$(b) $(TARGET_OUT)/bin/$(b)) \
&& ln -sf /apex/com.android.runtime/bin/$(b) $(TARGET_OUT)/bin/$(b)) \
)
# End of runtime APEX compatibilty.