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
This commit is contained in:
Jooyung Han
2024-08-08 10:42:47 +09:00
parent edcbad4054
commit 8fa6116aca

View File

@@ -43,9 +43,9 @@ var (
}, },
"abis", "allow-prereleased", "sdk-version", "skip-sdk-check") "abis", "allow-prereleased", "sdk-version", "skip-sdk-check")
decompressApex = pctx.StaticRule("decompressApex", blueprint.RuleParams{ 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}"}, CommandDeps: []string{"${deapexer}"},
Description: "decompress", Description: "decompress $out",
}) })
) )