diff --git a/0001-Fix-processing-of-download-errors-RhBug-2024527.patch b/0001-Fix-processing-of-download-errors-RhBug-2024527.patch new file mode 100644 index 0000000..257df03 --- /dev/null +++ b/0001-Fix-processing-of-download-errors-RhBug-2024527.patch @@ -0,0 +1,37 @@ +From 3e36c99d401530dc026712523a7c445da17ee299 Mon Sep 17 00:00:00 2001 +From: Marek Blaha +Date: Mon, 14 Mar 2022 09:49:52 +0100 +Subject: [PATCH] Fix processing of download errors (RhBug: 2024527) + +Users with different than english locale are not able to update their +systems in case that some of updates are already downloaded in the dnf +cache (e.g. using dnf-automatic). + +The error string is taken from librepo target where it is stored +untranslated. Therefore we need to compare untranslated versions of the +string. + += changelog = +msg: Fix download errors handling in non-english locales +type: bugfix +resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2024527 +--- + dnf/repo.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dnf/repo.py b/dnf/repo.py +index 1822cf0..ec1a253 100644 +--- a/dnf/repo.py ++++ b/dnf/repo.py +@@ -108,7 +108,7 @@ def _download_payloads(payloads, drpm, fail_fast=True): + callbacks = tgt.getCallbacks() + payload = callbacks.package_pload + pkg = payload.pkg +- if err == _('Already downloaded'): ++ if err == 'Already downloaded': + errs._skipped.add(pkg) + continue + pkg.repo._repo.expire() +-- +libgit2 1.1.0 + diff --git a/dnf.spec b/dnf.spec index da302d6..9ff971f 100644 --- a/dnf.spec +++ b/dnf.spec @@ -66,12 +66,13 @@ It supports RPMs, modules and comps groups & environments. Name: dnf Version: 4.11.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: %{pkg_summary} # For a breakdown of the licensing, see PACKAGE-LICENSING License: GPLv2+ URL: https://github.com/rpm-software-management/dnf Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +Patch0001: 0001-Fix-processing-of-download-errors-RhBug-2024527.patch BuildArch: noarch BuildRequires: cmake BuildRequires: gettext @@ -359,6 +360,9 @@ popd %{python3_sitelib}/%{name}/automatic/ %changelog +* Wed Mar 30 2022 Jaroslav Rohel - 4.11.1-2 +- Backport patch to fix: dnf breaks updateprocess with "already downloaded" (RhBug:2024527) + * Mon Mar 14 2022 Pavla Kratochvilova - 4.11.1-1 - Update to 4.11.1