From 4bb1961516843cd685212f1db4a9500f6b4e011e Mon Sep 17 00:00:00 2001 From: shirely16 Date: Sat, 22 Jan 2022 11:28:47 +0800 Subject: [PATCH] Reposync does not stop downloading packages (cherry picked from commit 0b53248f42fe038e1096e390ab1c52517227fe16) --- backport-Disable-dnf-playground-command.patch | 38 +++++++++++++++++++ ...-fix-error-when-downloading-packages.patch | 31 +++++++++++++++ dnf-plugins-core.spec | 8 +++- 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 backport-Disable-dnf-playground-command.patch create mode 100644 backport-fix-error-when-downloading-packages.patch diff --git a/backport-Disable-dnf-playground-command.patch b/backport-Disable-dnf-playground-command.patch new file mode 100644 index 0000000..ba184ab --- /dev/null +++ b/backport-Disable-dnf-playground-command.patch @@ -0,0 +1,38 @@ +From 810a1ca794cad229d2cbc6ed7181a4f4d8d3fbc7 Mon Sep 17 00:00:00 2001 +From: Silvie Chlupova +Date: Thu, 12 Aug 2021 16:24:56 +0200 +Subject: [PATCH] Disable dnf playground command + += changelog = +msg: playground command doesn't work +type: bugfix +related: https://bugzilla.redhat.com/show_bug.cgi?id=1955907 + +Conflict:NA +Reference:https://github.com/rpm-software-management/dnf-plugins-core/commit/810a1ca794cad229d2cbc6ed7181a4f4d8d3fbc7 +--- + plugins/copr.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/plugins/copr.py b/plugins/copr.py +index 5cf17ef2..3cd6558b 100644 +--- a/plugins/copr.py ++++ b/plugins/copr.py +@@ -117,6 +117,8 @@ def set_argparser(parser): + parser.add_argument('arg', nargs='*') + + def configure(self): ++ if self.cli.command.opts.command != "copr": ++ return + copr_hub = None + copr_plugin_config = ConfigParser() + config_files = [] +@@ -681,6 +683,7 @@ def set_argparser(parser): + choices=['enable', 'disable', 'upgrade']) + + def run(self): ++ raise dnf.exceptions.Error("Playground is temporarily unsupported") + subcommand = self.opts.subcommand[0] + chroot = self._guess_chroot() + if subcommand == "enable": + diff --git a/backport-fix-error-when-downloading-packages.patch b/backport-fix-error-when-downloading-packages.patch new file mode 100644 index 0000000..d15b458 --- /dev/null +++ b/backport-fix-error-when-downloading-packages.patch @@ -0,0 +1,31 @@ +From bdfb8ed33b54683057364df729d45e782d19e708 Mon Sep 17 00:00:00 2001 +From: Marek Blaha +Date: Wed, 6 Oct 2021 13:40:55 +0200 +Subject: [PATCH] reposync: Use fail_fast=False when downloading packages + (RhBug:2009894) + += changelog = +msg: Reposync does not stop downloading packages on the first error +type: bugfix +resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2009894 + +Conflict:NA +Reference:https://github.com/rpm-software-management/dnf-plugins-core/commit/bdfb8ed33b54683057364df729d45e782d19e708 +--- + dnf-plugins-core.spec | 2 +- + plugins/reposync.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plugins/reposync.py b/plugins/reposync.py +index 66c76a77..0ff936f8 100644 +--- a/plugins/reposync.py ++++ b/plugins/reposync.py +@@ -303,7 +303,7 @@ def download_packages(self, pkglist): + progress, 0) + payloads = [RPMPayloadLocation(pkg, progress, self.pkg_download_path(pkg)) + for pkg in pkglist] +- base._download_remote_payloads(payloads, drpm, progress, None) ++ base._download_remote_payloads(payloads, drpm, progress, None, False) + + def print_urls(self, pkglist): + for pkg in pkglist: diff --git a/dnf-plugins-core.spec b/dnf-plugins-core.spec index 8a5e5bf..5f5bcb9 100644 --- a/dnf-plugins-core.spec +++ b/dnf-plugins-core.spec @@ -7,13 +7,15 @@ Name: dnf-plugins-core Version: 4.0.17 -Release: 2 +Release: 3 Summary: Core Plugins for DNF License: GPLv2+ URL: https://github.com/rpm-software-management/dnf-plugins-core Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Patch6000: backport-Return-error-when-dnf-download-failed.patch +Patch6001: backport-Disable-dnf-playground-command.patch +Patch6002: backport-fix-error-when-downloading-packages.patch BuildArch: noarch BuildRequires: cmake gettext python3-sphinx gdb @@ -317,6 +319,10 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/ %{_mandir}/man8/dnf-local.* %changelog +* Sat Jan 22 2022 hanhui - 4.0.17-3 +- DESC:Reposync does not stop downloading packages + fix bug playground command doesn't work + * Fri Apr 16 2021 hanhui - 4.0.17-2 - Type:bugfix - ID:NA -- Gitee