Add GatherPackagingSpecsWithFilter
android_system_image used GatherPackagingSpecs and then filter only system modules. But some modules were omitted in this logic because there are modules which has the same relative path, so the later one is ignored even though its partition info is what we're looking for. So add filter logic in GatherPackagingSpecs to avoid this problem Bug: 323793487 Test: build android_system_image, and then check if it contains every module we want Change-Id: Iec8ae920736d3d1920eecad71ba0f8f2fe848e6c
This commit is contained in:
@@ -50,8 +50,8 @@ type filesystem struct {
|
||||
// Function that builds extra files under the root directory and returns the files
|
||||
buildExtraFiles func(ctx android.ModuleContext, root android.OutputPath) android.OutputPaths
|
||||
|
||||
// Function that filters PackagingSpecs returned by PackagingBase.GatherPackagingSpecs()
|
||||
filterPackagingSpecs func(specs map[string]android.PackagingSpec)
|
||||
// Function that filters PackagingSpec in PackagingBase.GatherPackagingSpecs()
|
||||
filterPackagingSpec func(spec android.PackagingSpec) bool
|
||||
|
||||
output android.OutputPath
|
||||
installDir android.InstallPath
|
||||
@@ -493,10 +493,7 @@ func (f *filesystem) SignedOutputPath() android.Path {
|
||||
// Note that "apex" module installs its contents to "apex"(fake partition) as well
|
||||
// for symbol lookup by imitating "activated" paths.
|
||||
func (f *filesystem) gatherFilteredPackagingSpecs(ctx android.ModuleContext) map[string]android.PackagingSpec {
|
||||
specs := f.PackagingBase.GatherPackagingSpecs(ctx)
|
||||
if f.filterPackagingSpecs != nil {
|
||||
f.filterPackagingSpecs(specs)
|
||||
}
|
||||
specs := f.PackagingBase.GatherPackagingSpecsWithFilter(ctx, f.filterPackagingSpec)
|
||||
return specs
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user