Skip install rules for apexes with installable: false
When an apex sets installable: false call SkipInstall to prevent creating the install rules, and don't report the install rules to Make. Fixes: 221261079 Test: m checkbuild Change-Id: If94759b16f79ee10ddcf8ee89603ca9e822b74f5
This commit is contained in:
@@ -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
|
||||
|
@@ -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()...)
|
||||
|
Reference in New Issue
Block a user