Blame SOURCES/0018-Fix-processing-of-download-errors-RhBug-2024527.patch

52b19a
From 9bd0423e1e543ed5f83924ec61aa253eced24cf8 Mon Sep 17 00:00:00 2001
52b19a
From: Marek Blaha <mblaha@redhat.com>
52b19a
Date: Mon, 14 Mar 2022 09:49:52 +0100
52b19a
Subject: [PATCH] Fix processing of download errors (RhBug: 2024527)
52b19a
52b19a
Users with different than english locale are not able to update their
52b19a
systems in case that some of updates are already downloaded in the dnf
52b19a
cache (e.g. using dnf-automatic).
52b19a
52b19a
The error string is taken from librepo target where it is stored
52b19a
untranslated. Therefore we need to compare untranslated versions of the
52b19a
string.
52b19a
52b19a
= changelog =
52b19a
msg:           Fix download errors handling in non-english locales
52b19a
type:          bugfix
52b19a
resolves:      https://bugzilla.redhat.com/show_bug.cgi?id=2024527
52b19a
---
52b19a
 dnf/repo.py | 2 +-
52b19a
 1 file changed, 1 insertion(+), 1 deletion(-)
52b19a
52b19a
diff --git a/dnf/repo.py b/dnf/repo.py
52b19a
index 1822cf01..ec1a2537 100644
52b19a
--- a/dnf/repo.py
52b19a
+++ b/dnf/repo.py
52b19a
@@ -108,7 +108,7 @@ def _download_payloads(payloads, drpm, fail_fast=True):
52b19a
         callbacks = tgt.getCallbacks()
52b19a
         payload = callbacks.package_pload
52b19a
         pkg = payload.pkg
52b19a
-        if err == _('Already downloaded'):
52b19a
+        if err == 'Already downloaded':
52b19a
             errs._skipped.add(pkg)
52b19a
             continue
52b19a
         pkg.repo._repo.expire()
52b19a
-- 
52b19a
2.35.1
52b19a