summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Wei Li <weiwli@google.com> 2025-03-19 16:31:24 -0700
committer Wei Li <weiwli@google.com> 2025-03-19 16:38:40 -0700
commitaf2b25c6155ae442b703d8aadbfcdd1f020ab823 (patch)
tree90f49cb9b3d5aed909b1e308d6e241760bcf7461
parentd85db0a8c7d4377c9c589b53eb20582b36ac0bbe (diff)
Build compliance metadata for files on system_other partition
Bug: 401369898 Test: presubmits Test: m sbom, and /system_other/system-other-odex-marker is in SBOM Change-Id: Ib32ee91ac4eaae8438a16e46dd1b04df7ae3bf33
-rw-r--r--filesystem/system_other.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/filesystem/system_other.go b/filesystem/system_other.go
index 348c01035..32a6cc784 100644
--- a/filesystem/system_other.go
+++ b/filesystem/system_other.go
@@ -120,8 +120,11 @@ func (m *systemOtherImage) GenerateAndroidBuildActions(ctx android.ModuleContext
// TOOD: CopySpecsToDir only exists on PackagingBase, but doesn't use any fields from it. Clean this up.
(&android.PackagingBase{}).CopySpecsToDir(ctx, builder, specs, stagingDir)
+ fullInstallPaths := []string{}
if len(m.properties.Preinstall_dexpreopt_files_from) > 0 {
builder.Command().Textf("touch %s", filepath.Join(stagingDir.String(), "system-other-odex-marker"))
+ installPath := android.PathForModuleInPartitionInstall(ctx, "system_other", "system-other-odex-marker")
+ fullInstallPaths = append(fullInstallPaths, installPath.String())
}
builder.Command().Textf("touch").Output(stagingDirTimestamp)
builder.Build("assemble_filesystem_staging_dir", "Assemble filesystem staging dir")
@@ -186,6 +189,10 @@ func (m *systemOtherImage) GenerateAndroidBuildActions(ctx android.ModuleContext
ctx.SetOutputFiles(android.Paths{output}, "")
ctx.CheckbuildFile(output)
+
+ // Dump compliance metadata
+ complianceMetadataInfo := ctx.ComplianceMetadataInfo()
+ complianceMetadataInfo.SetFilesContained(fullInstallPaths)
}
func (s *systemOtherImage) generateFilesystemConfig(ctx android.ModuleContext, stagingDir, stagingDirTimestamp android.Path) android.Path {