summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2020-05-20 17:15:16 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-05-20 17:15:16 +0000
commitdf865a9a171429311629ee023d232d23921d756c (patch)
treee29f3d4402db130a020eeea516711349584ea44d
parent7f81fd1403105da20a23847e80eefae9a25dc29a (diff)
parent5761b525deb9e38973d98738932df1f55b46fbfa (diff)
Merge "Do not fail if unzip found no files to extract" into rvc-dev
-rw-r--r--core/soong_android_app_set.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/soong_android_app_set.mk b/core/soong_android_app_set.mk
index e84371ca61..4c27e53463 100644
--- a/core/soong_android_app_set.mk
+++ b/core/soong_android_app_set.mk
@@ -24,8 +24,10 @@ $(LOCAL_BUILT_MODULE): $(1)
endef
$(eval $(call extract-master-from-apk-set,$(LOCAL_PREBUILT_MODULE_FILE),$(LOCAL_APK_SET_MASTER_FILE)))
+# unzip returns 11 it there was nothing to extract, which is expected,
+# $(LOCAL_APK_SET_MASTER_FILE) has is already there.
LOCAL_POST_INSTALL_CMD := unzip -qo -j -d $(dir $(LOCAL_INSTALLED_MODULE)) \
- $(LOCAL_PREBUILT_MODULE_FILE) -x $(LOCAL_APK_SET_MASTER_FILE)
+ $(LOCAL_PREBUILT_MODULE_FILE) -x $(LOCAL_APK_SET_MASTER_FILE) || [[ $$? -eq 11 ]]
$(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD := $(LOCAL_POST_INSTALL_CMD)
PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))