From 357e70357c80b465d17176d8cc1694d4b0149a01 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 2 Aug 2024 11:42:35 +0100 Subject: [PATCH] sbom: don't store runtime dependencies when bottling. In some cases this prevents `:all` bottles when the recursive dependencies vary. This SBOM is regenerated correctly at pour time. --- Library/Homebrew/sbom.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Library/Homebrew/sbom.rb b/Library/Homebrew/sbom.rb index facc7f37bf..a1b20c4b58 100644 --- a/Library/Homebrew/sbom.rb +++ b/Library/Homebrew/sbom.rb @@ -306,7 +306,7 @@ class SBOM T::Array[T::Hash[Symbol, String]])]]) } def full_spdx_runtime_dependencies(bottling:) - return [] if @runtime_dependencies.blank? + return [] if bottling || @runtime_dependencies.blank? @runtime_dependencies.compact.filter_map do |dependency| next unless dependency.present? @@ -340,10 +340,6 @@ class SBOM }, ], } - if bottling - dependency_json.delete(:downloadLocation) - dependency_json.delete(:checksums) - end dependency_json end end