diff options
author | Alexei Nicoara <ancr@google.com> | 2022-07-06 12:03:11 +0100 |
---|---|---|
committer | Cherrypicker Worker <android-build-cherrypicker-worker@google.com> | 2022-07-07 08:44:00 +0000 |
commit | d4ba42e01c22b3c37845b4600f50cf47e884d15a (patch) | |
tree | 0a33689a1c6025feaf9ebda865cbb92311b3194b | |
parent | 224384434e25e52384e7fe758a9d2fbfde06d7a4 (diff) | |
download | soong-d4ba42e01c22b3c37845b4600f50cf47e884d15a.tar.gz |
Passing default version to zipApex as well
Test: presubmit
Bug: 231691643
Change-Id: Ic751d7ea2d23180855897702a03bf1b589d7ef80
(cherry picked from commit c939b0181d097c1a560e9de905fdfa59e4f7ea75)
Merged-In: Ic751d7ea2d23180855897702a03bf1b589d7ef80
-rw-r--r-- | apex/builder.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apex/builder.go b/apex/builder.go index 7e2b924c7..e3c447632 100644 --- a/apex/builder.go +++ b/apex/builder.go @@ -112,6 +112,7 @@ var ( `--canned_fs_config ${canned_fs_config} ` + `--include_build_info ` + `--payload_type image ` + + `--apex_version ${apex_version} ` + `--key ${key} ${opt_flags} ${image_dir} ${out} `, CommandDeps: []string{"${apexer}", "${avbtool}", "${e2fsdroid}", "${merge_zips}", "${mke2fs}", "${resize2fs}", "${sefcontext_compile}", "${make_f2fs}", "${sload_f2fs}", "${make_erofs}", @@ -119,7 +120,7 @@ var ( Rspfile: "${out}.copy_commands", RspfileContent: "${copy_commands}", Description: "APEX ${image_dir} => ${out}", - }, "tool_path", "image_dir", "copy_commands", "file_contexts", "canned_fs_config", "key", "opt_flags", "manifest", "payload_fs_type") + }, "tool_path", "image_dir", "copy_commands", "file_contexts", "canned_fs_config", "key", "opt_flags", "manifest", "payload_fs_type", "apex_version") zipApexRule = pctx.StaticRule("zipApexRule", blueprint.RuleParams{ Command: `rm -rf ${image_dir} && mkdir -p ${image_dir} && ` + @@ -127,12 +128,13 @@ var ( `APEXER_TOOL_PATH=${tool_path} ` + `${apexer} --force --manifest ${manifest} ` + `--payload_type zip ` + + `--apex_version ${apex_version} ` + `${image_dir} ${out} `, CommandDeps: []string{"${apexer}", "${merge_zips}", "${soong_zip}", "${zipalign}", "${aapt2}"}, Rspfile: "${out}.copy_commands", RspfileContent: "${copy_commands}", Description: "ZipAPEX ${image_dir} => ${out}", - }, "tool_path", "image_dir", "copy_commands", "manifest") + }, "tool_path", "image_dir", "copy_commands", "manifest", "apex_version") apexProtoConvertRule = pctx.AndroidStaticRule("apexProtoConvertRule", blueprint.RuleParams{ @@ -667,8 +669,6 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) { optFlags = append(optFlags, "--manifest_json "+a.manifestJsonOut.String()) } - optFlags = append(optFlags, "--apex_version "+defaultManifestVersion) - optFlags = append(optFlags, "--payload_fs_type "+a.payloadFsType.string()) ctx.Build(pctx, android.BuildParams{ @@ -684,6 +684,7 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) { "file_contexts": fileContexts.String(), "canned_fs_config": cannedFsConfig.String(), "key": a.privateKeyFile.String(), + "apex_version": defaultManifestVersion, "opt_flags": strings.Join(optFlags, " "), }, }) @@ -780,6 +781,7 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) { "image_dir": imageDir.String(), "copy_commands": strings.Join(copyCommands, " && "), "manifest": a.manifestPbOut.String(), + "apex_version": defaultManifestVersion, }, }) } |