Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c939b018 authored by Alexei Nicoara's avatar Alexei Nicoara
Browse files

Passing default version to zipApex as well

Test: presubmit
Bug: 231691643
Change-Id: Ic751d7ea2d23180855897702a03bf1b589d7ef80
parent 9d46dcf9
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -107,6 +107,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}",
@@ -114,7 +115,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} && ` +
@@ -122,12 +123,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{
@@ -655,8 +657,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{
@@ -672,6 +672,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, " "),
			},
		})
@@ -768,6 +769,7 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
				"image_dir":     imageDir.String(),
				"copy_commands": strings.Join(copyCommands, " && "),
				"manifest":      a.manifestPbOut.String(),
				"apex_version":  defaultManifestVersion,
			},
		})
	}