Bug 2066851

Summary: dnf download ignores install_weak_deps=0
Product: [Fedora] Fedora Reporter: Коренберг Марк <socketpair>
Component: dnf-plugins-coreAssignee: rpm-software-management
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 39CC: daniel.mach, jmracek, mblaha, packaging-team-maint, pkratoch, praiskup, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Коренберг Марк 2022-03-22 15:42:49 UTC
The command dnf download ignores install_weak_deps=0.

Why:

Download plugin contains code:

    def _get_packages_with_deps(self, pkg_specs, source=False):
        """Get packages matching pkg_specs and the deps."""

            ...

            rc = goal.run()


            ...

As you can see, it does not fill parameter 

ignore_weak_deps=(not conf.install_weak_deps))

as it does in dnf/base.py

It's important since it download more .src.rpm files than it should (in my case).

P.S. Actually, it is triggered in Fedora 34, but I believe the problem is still here. https://github.com/rpm-software-management/dnf-plugins-core/blob/master/plugins/download.py#L256

Comment 1 Marek Blaha 2022-03-30 12:05:52 UTC
It would be great if you could create a pull request on this (since you already have investigated the issue). What do you think?

Comment 2 Коренберг Марк 2022-03-31 07:47:30 UTC
Sorry, I can't fix because I don't understand internal DNF API. So, I don't know where to get the settings in order to pass them to run().

Comment 3 Ben Cotton 2022-08-09 13:14:08 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.

Comment 4 Fedora Release Engineering 2023-08-16 07:05:23 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.