Do not append .recovery suffix for recovery-specific otacerts_zip module
partition suffix should only be appended for *_available modules for
androidmk entries generation, and should not be appended for
partition-specific module.
Test: m soong_generated_recovery_filesystem_module
Bug: 381888358
Change-Id: If250bb439f5e3e339901935730552104a5b76e2b
diff --git a/etc/otacerts_zip.go b/etc/otacerts_zip.go
index 8220cea..53ddc50 100644
--- a/etc/otacerts_zip.go
+++ b/etc/otacerts_zip.go
@@ -111,6 +111,10 @@
return proptools.StringDefault(m.properties.Filename, "otacerts.zip")
}
+func (m *otacertsZipModule) onlyInRecovery() bool {
+ return m.ModuleBase.InstallInRecovery()
+}
+
func (m *otacertsZipModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
// Read .x509.pem file defined in PRODUCT_DEFAULT_DEV_CERTIFICATE or the default test key.
pem, _ := ctx.Config().DefaultAppCertificate(ctx)
@@ -136,7 +140,7 @@
func (m *otacertsZipModule) AndroidMkEntries() []android.AndroidMkEntries {
nameSuffix := ""
- if m.InRecovery() {
+ if m.InRecovery() && !m.onlyInRecovery() {
nameSuffix = ".recovery"
}
return []android.AndroidMkEntries{android.AndroidMkEntries{