dnf
dnf copied to clipboard
Add all candidates for reinstall to solver
Resolves: https://issues.redhat.com/browse/RHEL-25005
The patch looks good.
But the original bugreport reported the issue with install
command (which works correctly according to my attempts to reproduce it). This patch fixes incorrect reinstall
behavior.
The patch looks good. But the original bugreport reported the issue with
install
command (which works correctly according to my attempts to reproduce it). This patch fixes incorrectreinstall
behavior.
Reporter incorrectly reported issue for install command, but https://issues.redhat.com/browse/RHEL-25005?focusedId=24167516&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-24167516 corrected the reproducer. The issue is not related to install command and even not to cost
option. Setting cost option only shoved strange behavior but in background DNF send to libsolv available RPM with higher ID.
@j-mracek I see. We're good to go then.
Shouldn't we provide a test case for this?
I can but I cannot ensure that the test will always fail without the patch, because the behavior without patch is not deterministic enough. Without patch the load of repository is driven by sorter in iterator.
def items(self):
"""return repos sorted by priority"""
return (item for item in sorted(super(RepoDict, self).items(),
key=lambda x: (x[1].priority, x[1].cost)))
I created a test - https://github.com/rpm-software-management/ci-dnf-stack/pull/1451