Don't use the same temp directory to uncompress dex
This was ok for apk because they are in different parent directory.
Test: marlin built
Bug: 63920015
Bug: 30972906
Change-Id: I5ed00824fda9e7e0a99c825402753c21a06ba6c5
diff --git a/core/definitions.mk b/core/definitions.mk
index 4eac01c..2d1953c 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -2601,11 +2601,12 @@
#
define uncompress-dexs
$(hide) if (zipinfo $@ '*.dex' 2>/dev/null | grep -v ' stor ' >/dev/null) ; then \
- rm -rf $(dir $@)uncompresseddexs && mkdir $(dir $@)uncompresseddexs; \
- unzip -q $@ '*.dex' -d $(dir $@)uncompresseddexs && \
+ tmpdir=$@.tmpdir; \
+ rm -rf $$tmpdir && mkdir $$tmpdir; \
+ unzip -q $@ '*.dex' -d $$tmpdir && \
zip -qd $@ '*.dex' && \
- ( cd $(dir $@)uncompresseddexs && find . -type f | sort | zip -qD -X -0 ../$(notdir $@) -@ ) && \
- rm -rf $(dir $@)uncompresseddexs; \
+ ( cd $$tmpdir && find . -type f | sort | zip -qD -X -0 ../$(notdir $@) -@ ) && \
+ rm -rf $$tmpdir; \
fi
endef