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

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-08-22 05:42:00 UTC
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.

Comment 5 Jaroslav Mracek 2023-08-22 05:42:00 UTC
I believe that the issue is resolved by DNF5. DNF5 is a replacement of Microdnf and in future (Fedora 41) also of DNF. It is available in Fedora38+, therefore I am closing the issue as resolved by DNF5. Please feel free to reopen the issue if I overlooked something or if you don't agree with solution.


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