Skip install rules for apexes with installable: false am: d9ccb6a2cb am: fbb6372522

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2014735

Change-Id: I0d548aae9c84b0ef963b490664274b790ab4e454
This commit is contained in:
Colin Cross
2022-03-08 06:15:18 +00:00
committed by Automerger Merge Worker
2 changed files with 8 additions and 2 deletions

View File

@@ -373,8 +373,10 @@ func (a *apexBundle) androidMkForType() android.AndroidMkData {
}
fmt.Fprintln(w, "LOCAL_MODULE_STEM :=", name+stemSuffix)
fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE :=", !a.installable())
fmt.Fprintln(w, "LOCAL_SOONG_INSTALLED_MODULE :=", a.installedFile.String())
fmt.Fprintln(w, "LOCAL_SOONG_INSTALL_PAIRS :=", a.outputFile.String()+":"+a.installedFile.String())
if a.installable() {
fmt.Fprintln(w, "LOCAL_SOONG_INSTALLED_MODULE :=", a.installedFile.String())
fmt.Fprintln(w, "LOCAL_SOONG_INSTALL_PAIRS :=", a.outputFile.String()+":"+a.installedFile.String())
}
// Because apex writes .mk with Custom(), we need to write manually some common properties
// which are available via data.Entries

View File

@@ -856,6 +856,10 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
installSuffix = imageCapexSuffix
}
if !a.installable() {
a.SkipInstall()
}
// Install to $OUT/soong/{target,host}/.../apex.
a.installedFile = ctx.InstallFile(a.installDir, a.Name()+installSuffix, a.outputFile,
a.compatSymlinks.Paths()...)