dnf-plugins-core/backport-download-plugin-respect-install_weak_deps-option-value.patch

32 lines
1.2 KiB
Diff
Raw Normal View History

From 95ff945cd92a8c8299874fe8007951f0d158113a Mon Sep 17 00:00:00 2001
From: Michal Gawlik <michal@gawlik.dev>
Date: Fri, 16 Sep 2022 13:09:18 +0200
Subject: [PATCH] download plugin: respect install_weak_deps option value
Do not download weak deps when install_weak_deps is set to False.
= changelog =
msg: download: skip downloading weak deps when install_weak_deps=False
type: bug
Reference:https://github.com/rpm-software-management/dnf-plugins-core/commit/95ff945cd92a8c8299874fe8007951f0d158113a
Conflict:NA
---
plugins/download.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/download.py b/plugins/download.py
index 92a6df4a..d8ce4bec 100644
--- a/plugins/download.py
+++ b/plugins/download.py
@@ -253,7 +253,7 @@ def _get_packages_with_deps(self, pkg_specs, source=False):
for pkg in pkgs:
goal = hawkey.Goal(self.base.sack)
goal.install(pkg)
- rc = goal.run()
+ rc = goal.run(ignore_weak_deps=(not self.base.conf.install_weak_deps))
if rc:
pkg_set.update(goal.list_installs())
pkg_set.update(goal.list_upgrades())
--