Only override prebuilts property if the override_apex.prebuilts is

explicitly specified (not nil).

This allows the base apex's prebuilts to be surfaced to the override
apex target.

Discovered when com.google.android.adbd's prebuilts didn't contain its
init.rc module.

Bug: 222588072
Test: CI
Change-Id: I925e98d53f7d9208652c629799ab568521ba7dfe
This commit is contained in:
Jingwen Chen
2022-06-08 16:00:39 +00:00
parent fdc0540751
commit df165c9e85
2 changed files with 130 additions and 2 deletions

View File

@@ -2523,8 +2523,10 @@ func (o *OverrideApex) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
}
// Prebuilts
prebuiltsLabelList := android.BazelLabelForModuleDeps(ctx, overridableProperties.Prebuilts)
attrs.Prebuilts = bazel.MakeLabelListAttribute(prebuiltsLabelList)
if overridableProperties.Prebuilts != nil {
prebuiltsLabelList := android.BazelLabelForModuleDeps(ctx, overridableProperties.Prebuilts)
attrs.Prebuilts = bazel.MakeLabelListAttribute(prebuiltsLabelList)
}
// Compressible
if overridableProperties.Compressible != nil {