From 6dbff039219e5186db651968ed924412005e5a0a Mon Sep 17 00:00:00 2001 From: Kiyoung Kim Date: Tue, 26 Nov 2024 03:21:24 +0000 Subject: Revert "Reland: Do not allow vintf_fragments for modules installed in the filesystem" This reverts commit df17e7b6c3c7d26efab1ec9fbcffdf16c325a229. Reason for revert: Build failure from git_main/seahawk target Change-Id: I320864ae76101a5fd5e3b4ca6daa11bad3548ae7 --- filesystem/filesystem.go | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) (limited to 'filesystem/filesystem.go') diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index c471da170..c34677060 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -71,10 +71,6 @@ type filesystemBuilder interface { // For example, GSI system.img contains system_ext and product artifacts and their // relPathInPackage need to be rebased to system/system_ext and system/system_product. ModifyPackagingSpec(spec *android.PackagingSpec) - - // Function to check if the filesystem should not use `vintf_fragments` property, - // but use `vintf_fragment` module type instead - ShouldUseVintfFragmentModuleOnly() bool } var _ filesystemBuilder = (*filesystem)(nil) @@ -329,9 +325,6 @@ var pctx = android.NewPackageContext("android/soong/filesystem") func (f *filesystem) GenerateAndroidBuildActions(ctx android.ModuleContext) { validatePartitionType(ctx, f) - if f.filesystemBuilder.ShouldUseVintfFragmentModuleOnly() { - f.validateVintfFragments(ctx) - } switch f.fsType(ctx) { case ext4Type, erofsType, f2fsType: f.output = f.buildImageUsingBuildImage(ctx) @@ -360,43 +353,6 @@ func (f *filesystem) GenerateAndroidBuildActions(ctx android.ModuleContext) { } } -func (f *filesystem) validateVintfFragments(ctx android.ModuleContext) { - visitedModule := map[string]bool{} - packagingSpecs := f.gatherFilteredPackagingSpecs(ctx) - - moduleInFileSystem := func(mod android.Module) bool { - for _, ps := range android.OtherModuleProviderOrDefault( - ctx, mod, android.InstallFilesProvider).PackagingSpecs { - if _, ok := packagingSpecs[ps.RelPathInPackage()]; ok { - return true - } - } - return false - } - - ctx.WalkDeps(func(child, parent android.Module) bool { - if visitedModule[child.Name()] { - return false - } - if !moduleInFileSystem(child) { - visitedModule[child.Name()] = true - return true - } - if vintfFragments := child.VintfFragments(ctx); vintfFragments != nil { - ctx.PropertyErrorf( - "vintf_fragments", - "Module %s is referenced by soong-defined filesystem %s with property vintf_fragments(%s) in use."+ - " Use vintf_fragment_modules property instead.", - child.Name(), - f.BaseModuleName(), - strings.Join(vintfFragments, ", "), - ) - } - visitedModule[child.Name()] = true - return true - }) -} - func (f *filesystem) appendToEntry(ctx android.ModuleContext, installedFile android.Path) { partitionBaseDir := android.PathForModuleOut(ctx, "root", f.partitionName()).String() + "/" @@ -801,10 +757,6 @@ func (f *filesystem) BuildLinkerConfigFile(ctx android.ModuleContext, builder *a f.appendToEntry(ctx, output) } -func (f *filesystem) ShouldUseVintfFragmentModuleOnly() bool { - return false -} - type partition interface { PartitionType() string } -- cgit v1.2.3-59-g8ed1b