Skip to content

Commit

Permalink
Fix sbomnix --depth with buildtime dependencies
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
henrirosten committed Nov 7, 2024
1 parent eec92a9 commit b73b597
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/sbomnix/nix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down

0 comments on commit b73b597

Please sign in to comment.