From 8fa6116aca054a0a531bfbdc5b11c7c089df5414 Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Thu, 8 Aug 2024 10:42:47 +0900 Subject: [PATCH] apex: rm $out before decompressing an apex. Otherwise, incremental build fails with "already exists". Bug: 357916000 Test: incremental build with PRODUCT_COMPRESSED_APEX=false and prebuilt compressed APEXes Change-Id: If2a0be735e3710afd1d40b16b43608028eb95c5a --- apex/prebuilt.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apex/prebuilt.go b/apex/prebuilt.go index 5e46bab60..20a13c38b 100644 --- a/apex/prebuilt.go +++ b/apex/prebuilt.go @@ -43,9 +43,9 @@ var ( }, "abis", "allow-prereleased", "sdk-version", "skip-sdk-check") decompressApex = pctx.StaticRule("decompressApex", blueprint.RuleParams{ - Command: `${deapexer} decompress --copy-if-uncompressed --input ${in} --output ${out}`, + Command: `rm -rf $out && ${deapexer} decompress --copy-if-uncompressed --input ${in} --output ${out}`, CommandDeps: []string{"${deapexer}"}, - Description: "decompress", + Description: "decompress $out", }) )