diff options
author | 2024-11-18 16:32:39 -0800 | |
---|---|---|
committer | 2024-11-18 16:32:39 -0800 | |
commit | 8156265979ee7dbbb98c32730a651d87ce8b3f53 (patch) | |
tree | 1653861a7d76cedb93d4c44001b871b83f76c7ac | |
parent | 04a33c6934f46d7a0013401aa05711ec7dc15f56 (diff) |
Remove METADATA files from implicit dependencies of SBOMs
Bug: 377969922
Test: lunch aosp_cf_x86_64_phone-trunk_staging-eng && m sbom
Test: m nothing, remove a METADATA file and m sbom
Test: run "m sbom" 2+ times, and SBOM is re-generated in each build
Change-Id: I42e303a56187ab2a96c3d709fbf8f2f54d1d4ca7
-rw-r--r-- | android/sbom.go | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/android/sbom.go b/android/sbom.go index 2a5499ed8..f2b9c0ff1 100644 --- a/android/sbom.go +++ b/android/sbom.go @@ -15,9 +15,7 @@ package android import ( - "io" "path/filepath" - "strings" "github.com/google/blueprint" ) @@ -55,21 +53,7 @@ func (this *sbomSingleton) GenerateBuildActions(ctx SingletonContext) { if !ctx.Config().HasDeviceProduct() { return } - // Get all METADATA files and add them as implicit input - metadataFileListFile := PathForArbitraryOutput(ctx, ".module_paths", "METADATA.list") - f, err := ctx.Config().fs.Open(metadataFileListFile.String()) - if err != nil { - panic(err) - } - b, err := io.ReadAll(f) - if err != nil { - panic(err) - } - allMetadataFiles := strings.Split(string(b), "\n") - implicits := []Path{metadataFileListFile} - for _, path := range allMetadataFiles { - implicits = append(implicits, PathForSource(ctx, path)) - } + implicits := []Path{} prodVars := ctx.Config().productVariables buildFingerprintFile := PathForArbitraryOutput(ctx, "target", "product", String(prodVars.DeviceName), "build_fingerprint.txt") implicits = append(implicits, buildFingerprintFile) |