!9 return error when dnf download failed
From: @shirely16 Reviewed-by: @yeah_wang,@yanan-rock Signed-off-by: @yanan-rock
This commit is contained in:
commit
9ebd21a28b
31
backport-Return-error-when-dnf-download-failed.patch
Normal file
31
backport-Return-error-when-dnf-download-failed.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 86b479d618c6ec7cace7ba8f0e53e4a05cdb59d9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhangrui182 <55428730+zhangrui182@users.noreply.github.com>
|
||||||
|
Date: Wed, 15 Jul 2020 10:41:18 +0800
|
||||||
|
Subject: [PATCH] return error when dnf download failed
|
||||||
|
|
||||||
|
fix RhBug:1844925: https://bugzilla.redhat.com/show_bug.cgi?id=1844925
|
||||||
|
|
||||||
|
Conflict:NA
|
||||||
|
Reference:https://github.com/rpm-software-management/dnf-plugins-core/commit/86b479d618c6ec7cace7ba8f0e53e4a05cdb59d9
|
||||||
|
|
||||||
|
---
|
||||||
|
plugins/download.py | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/download.py b/plugins/download.py
|
||||||
|
index c0fc213d..92a6df4a 100644
|
||||||
|
--- a/plugins/download.py
|
||||||
|
+++ b/plugins/download.py
|
||||||
|
@@ -259,9 +259,9 @@ def _get_packages_with_deps(self, pkg_specs, source=False):
|
||||||
|
pkg_set.update(goal.list_upgrades())
|
||||||
|
else:
|
||||||
|
msg = [_('Error in resolve of packages:')]
|
||||||
|
- logger.warning("\n ".join(msg + [str(pkg) for pkg in pkgs]))
|
||||||
|
- logger.warning(dnf.util._format_resolve_problems(goal.problem_rules()))
|
||||||
|
- return []
|
||||||
|
+ logger.error("\n ".join(msg + [str(pkg) for pkg in pkgs]))
|
||||||
|
+ logger.error(dnf.util._format_resolve_problems(goal.problem_rules()))
|
||||||
|
+ raise dnf.exceptions.Error()
|
||||||
|
return pkg_set
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
@ -7,11 +7,14 @@
|
|||||||
|
|
||||||
Name: dnf-plugins-core
|
Name: dnf-plugins-core
|
||||||
Version: 4.0.17
|
Version: 4.0.17
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Core Plugins for DNF
|
Summary: Core Plugins for DNF
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://github.com/rpm-software-management/dnf-plugins-core
|
URL: https://github.com/rpm-software-management/dnf-plugins-core
|
||||||
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
Patch6000: backport-Return-error-when-dnf-download-failed.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: cmake gettext python3-sphinx gdb
|
BuildRequires: cmake gettext python3-sphinx gdb
|
||||||
Requires: python3-%{name} = %{version}-%{release}
|
Requires: python3-%{name} = %{version}-%{release}
|
||||||
@ -148,7 +151,7 @@ on the local filesystem and generating repo metadata.
|
|||||||
%package_help
|
%package_help
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup
|
%autosetup -p1
|
||||||
mkdir build-py3
|
mkdir build-py3
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -314,6 +317,12 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/
|
|||||||
%{_mandir}/man8/dnf-local.*
|
%{_mandir}/man8/dnf-local.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Apr 16 2021 hanhui <hanhui15@huawei.com> - 4.0.17-2
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:return error when dnf download failed
|
||||||
|
|
||||||
* Tue Apr 28 2020 zhouyihang <zhouyihang3@huawei.com> - 4.0.17-1
|
* Tue Apr 28 2020 zhouyihang <zhouyihang3@huawei.com> - 4.0.17-1
|
||||||
- Type:requirement
|
- Type:requirement
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user