From a99d0b114be2b91664045b93fe39330dce74afc5 Mon Sep 17 00:00:00 2001 From: Henri Rosten Date: Thu, 7 Nov 2024 07:56:17 +0200 Subject: [PATCH] Fix sbomnix --depth with buildtime dependencies Remove unnecessary optimization from sbomnix, which broke the `sbomnix` command line option `--depth` when used together with `--buildtime` option. The removed optimization caused `--buildtime` sboms to always include the full closure (all buildtime dependencies) even if `--depth` was specified, requesting dependencies only up until specified depth in the dependency graph. Signed-off-by: Henri Rosten --- src/sbomnix/nix.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/sbomnix/nix.py b/src/sbomnix/nix.py index 44834d2..954b3eb 100644 --- a/src/sbomnix/nix.py +++ b/src/sbomnix/nix.py @@ -81,10 +81,6 @@ def add_path(self, nixpath): self._add_cached(nixpath, drv=None) return self._update(drv_path, nixpath) - if self.buildtime: - ret = exec_cmd(["nix-store", "-qR", drv_path]) - for candidate in ret.stdout.splitlines(): - self._update(candidate) def to_dataframe(self): """Return store derivations as pandas dataframe"""