Skip to content

Commit

Permalink
fix(download): resolve dependencies for debuginfo and debugsource pac…
Browse files Browse the repository at this point in the history
…kages

= changelog =
msg: download plugin now resolves dependencies for debuginfo and debugsource packages
type: bugfix
  • Loading branch information
TheHillBright authored and kontura committed Jun 10, 2024
1 parent f84b7e0 commit 6adad45
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plugins/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ def _get_pkg_objs_debuginfo(self, pkg_specs):

break

if self.opts.resolve:
dbg_pkgs = self._get_packages_with_deps((), dbg_pkgs)

return dbg_pkgs

def _get_pkg_objs_debugsource(self, pkg_specs):
Expand All @@ -231,6 +234,9 @@ def _get_pkg_objs_debugsource(self, pkg_specs):
for p in dbg_available:
dbg_pkgs.add(p)

if self.opts.resolve:
dbg_pkgs = self._get_packages_with_deps((), dbg_pkgs)

return dbg_pkgs

def _get_packages(self, pkg_specs, source=False):
Expand All @@ -249,9 +255,9 @@ def _get_packages(self, pkg_specs, source=False):
pkgs = list(itertools.chain(*queries))
return pkgs

def _get_packages_with_deps(self, pkg_specs, source=False):
def _get_packages_with_deps(self, pkg_specs, pkgs=frozenset()):
"""Get packages matching pkg_specs and the deps."""
pkgs = self._get_packages(pkg_specs)
pkgs = pkgs | set(self._get_packages(pkg_specs))
pkg_set = set(pkgs)
for pkg in pkgs:
goal = hawkey.Goal(self.base.sack)
Expand Down

0 comments on commit 6adad45

Please sign in to comment.