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
diff --git a/apex/prebuilt.go b/apex/prebuilt.go
index 5e46bab..20a13c3 100644
--- a/apex/prebuilt.go
+++ b/apex/prebuilt.go
@@ -43,9 +43,9 @@
},
"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",
})
)