diff options
author | 2025-02-19 13:12:08 -0800 | |
---|---|---|
committer | 2025-02-19 13:12:08 -0800 | |
commit | 435752edcdc4d03db20558b59664e759afa60436 (patch) | |
tree | ca3a6bd57b4cd6b92f7c1e2261e4f614fb24b76d /filesystem/filesystem.go | |
parent | 14b8145bc8a89881a85497e27f12983361bd3bb9 (diff) | |
parent | abec3ecb0a8e94773a8f1eb795f7720c883d0176 (diff) |
Merge changes from topic "dependency_sub_dir" into main
* changes:
Propagate owners info in filesystem provider
Introduce Soong API ctx.OtherModuleSubDir(m Module)
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r-- | filesystem/filesystem.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index c0fb636ea..40a460b31 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -384,6 +384,11 @@ type InstalledFilesStruct struct { Json android.Path } +type InstalledModuleInfo struct { + Name string + Variation string +} + type FilesystemInfo struct { // The built filesystem image Output android.Path @@ -434,6 +439,8 @@ type FilesystemInfo struct { SelinuxFc android.Path FilesystemConfig android.Path + + Owners []InstalledModuleInfo } // FullInstallPathInfo contains information about the "full install" paths of all the files @@ -682,6 +689,7 @@ func (f *filesystem) GenerateAndroidBuildActions(ctx android.ModuleContext) { ErofsCompressHints: erofsCompressHints, SelinuxFc: f.selinuxFc, FilesystemConfig: f.generateFilesystemConfig(ctx, rootDir, rebasedDir), + Owners: f.gatherOwners(specs), } android.SetProvider(ctx, FilesystemProvider, fsInfo) @@ -1335,6 +1343,18 @@ func (f *filesystem) gatherFilteredPackagingSpecs(ctx android.ModuleContext) map return f.PackagingBase.GatherPackagingSpecsWithFilterAndModifier(ctx, f.filesystemBuilder.FilterPackagingSpec, f.filesystemBuilder.ModifyPackagingSpec) } +func (f *filesystem) gatherOwners(specs map[string]android.PackagingSpec) []InstalledModuleInfo { + var owners []InstalledModuleInfo + for _, p := range android.SortedKeys(specs) { + spec := specs[p] + owners = append(owners, InstalledModuleInfo{ + Name: spec.Owner(), + Variation: spec.Variation(), + }) + } + return owners +} + // Dexpreopt files are installed to system_other. Collect the packaingSpecs for the dexpreopt files // from this partition to export to the system_other partition later. func (f *filesystem) systemOtherFiles(ctx android.ModuleContext) map[string]android.PackagingSpec { |