summaryrefslogtreecommitdiff
path: root/filesystem
diff options
context:
space:
mode:
author Chaitanya Cheemala (xWF) <ccheemala@google.com> 2024-11-19 09:29:03 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-11-19 09:29:03 +0000
commite3a84fe7d64d6a96f656674cec93f72874f8f40c (patch)
tree56d01e1f16d1bfe059127b2571c5827871d60551 /filesystem
parentd3d89ede5d31c6175915dc4516bf6cd5cb3cd350 (diff)
Revert "Do not allow vintf_fragments for modules installed in the filesystem"
This reverts commit d3d89ede5d31c6175915dc4516bf6cd5cb3cd350. Reason for revert: Likely culprit for b/379811732 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted. Change-Id: I9d70e7ae4a7c9663d6bc25f0291df615dfc6d58b
Diffstat (limited to 'filesystem')
-rw-r--r--filesystem/filesystem.go48
-rw-r--r--filesystem/system_image.go4
2 files changed, 0 insertions, 52 deletions
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
}
diff --git a/filesystem/system_image.go b/filesystem/system_image.go
index 60a513346..d03eab45b 100644
--- a/filesystem/system_image.go
+++ b/filesystem/system_image.go
@@ -63,7 +63,3 @@ func (s *systemImage) FilterPackagingSpec(ps android.PackagingSpec) bool {
(ps.Partition() == "system" || ps.Partition() == "root" ||
strings.HasPrefix(ps.Partition(), "system/"))
}
-
-func (s *systemImage) ShouldUseVintfFragmentModuleOnly() bool {
- return true
-}