dcavalca / rpms / dnf

Forked from rpms/dnf 2 years ago
Clone

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

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