Bug 2066851 - dnf download ignores install_weak_deps=0
Summary: dnf download ignores install_weak_deps=0
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core
Version: 39
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-22 15:42 UTC by Коренберг Марк
Modified: 2023-08-16 07:05 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.