Reset permissions after unzipping jars

Jars unzipped for jacoco instrumentation may contain nonsensical
permissions.  Use chmod -R =rwX to apply the current umask to all
the files and add the execute bit to directories.

Bug: 227470935
Test: manual
Change-Id: I52667ec3f0b8b8ce64b57fab088ca9d20cf561e1
This commit is contained in:
Colin Cross 2022-03-30 20:04:06 -07:00
parent 06f7176fc6
commit a8ac282038

View file

@ -50,6 +50,7 @@ $(my_unzipped_timestamp_path): $(LOCAL_FULL_CLASSES_PRE_JACOCO_JAR)
unzip -qDD $(PRIVATE_FULL_CLASSES_PRE_JACOCO_JAR) \ unzip -qDD $(PRIVATE_FULL_CLASSES_PRE_JACOCO_JAR) \
-d $(PRIVATE_UNZIPPED_PATH) \ -d $(PRIVATE_UNZIPPED_PATH) \
$(PRIVATE_INCLUDE_ARGS) $(PRIVATE_INCLUDE_ARGS)
chmod -R =rwX $(PRIVATE_UNZIPPED_PATH)
(cd $(PRIVATE_UNZIPPED_PATH) && rm -rf $(PRIVATE_EXCLUDE_ARGS)) (cd $(PRIVATE_UNZIPPED_PATH) && rm -rf $(PRIVATE_EXCLUDE_ARGS))
(cd $(PRIVATE_UNZIPPED_PATH) && find -not -name "*.class" -type f -exec rm {} \;) (cd $(PRIVATE_UNZIPPED_PATH) && find -not -name "*.class" -type f -exec rm {} \;)
touch $(PRIVATE_UNZIPPED_TIMESTAMP_PATH) touch $(PRIVATE_UNZIPPED_TIMESTAMP_PATH)