Compare commits

...

12 Commits

Author SHA1 Message Date
openeuler-ci-bot
26ce4ff21b
!24 Reposync does not stop downloading packages
Merge pull request !24 from shirely/openEuler-20.03-LTS-SP3
2022-01-22 06:09:03 +00:00
shirely16
0b53248f42 Reposync does not stop downloading packages 2022-01-22 11:28:47 +08:00
openeuler-ci-bot
3e4e5bd1a1 !11 [sync] PR-9: return error when dnf download failed
From: @openeuler-sync-bot
Reviewed-by: @yanan-rock
Signed-off-by: @yanan-rock
2021-04-16 11:19:14 +08:00
shirely
e096923d94 解决sync问题 2021-04-16 10:23:16 +08:00
shirely16
9c0dc12e9b return error when dnf download failed
(cherry picked from commit 334d7a9eb785df9843f234ac29fda8f091d50f26)
2021-04-16 10:00:11 +08:00
openeuler-ci-bot
a38bdc4ce3 !8 【LTS升级】update dnf-plugins-core to 4.0.17
Merge pull request !8 from yu_boyun/openEuler-20.03-LTS
2020-08-31 20:36:47 +08:00
yu_boyun
f6ae84272d update 2020-08-29 17:04:03 +08:00
openeuler-ci-bot
c9c0e4aeff !4 dnf-plugins-core: bugfix about update
Merge pull request !4 from orange-snn/master
2020-03-21 22:07:17 +08:00
songnannan
4ff560b7a1 bugfix about update 2020-03-21 20:40:16 +08:00
openeuler-ci-bot
58c6325a5a !3 fix update
Merge pull request !3 from Anonymous_Z/anonymous_z
2020-02-28 18:25:54 +08:00
Anonymous_Z
03ac5968ea fix update fail 2020-02-28 15:45:18 +08:00
Anonymous_Z
442771ac21 fix update fail 2020-02-28 14:05:03 +08:00
6 changed files with 225 additions and 29 deletions

View File

@ -0,0 +1,38 @@
From 810a1ca794cad229d2cbc6ed7181a4f4d8d3fbc7 Mon Sep 17 00:00:00 2001
From: Silvie Chlupova <sisi.chlupova@gmail.com>
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":

View 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

View File

@ -0,0 +1,31 @@
From bdfb8ed33b54683057364df729d45e782d19e708 Mon Sep 17 00:00:00 2001
From: Marek Blaha <mblaha@redhat.com>
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:

Binary file not shown.

Binary file not shown.

View File

@ -1,20 +1,24 @@
%global dnf_lowest_compatible 4.2.14
%global dnf_lowest_compatible 4.2.22
%global dnf_plugins_extra 2.0.0
%global hawkey_version 0.34.0
%global hawkey_version 0.46.1
%bcond_without python3
%bcond_without yumcompatibility
%bcond_without yumutils
Name: dnf-plugins-core
Version: 4.0.11
Version: 4.0.17
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 %{_bindir}/sphinx-build-3
BuildRequires: cmake gettext python3-sphinx gdb
Requires: python3-%{name} = %{version}-%{release}
Requires: dnf >= %{dnf_lowest_compatible} %{name} = %{version}-%{release}
Requires: python3-dnf >= %{dnf_lowest_compatible}
@ -44,6 +48,7 @@ Provides: dnf-utils = %{version}-%{release}
Conflicts: dnf-plugins-extras-common-data < %{dnf_plugins_extra}
Conflicts: yum-utils < 1.1.31-520 yum-plugin-copr < 1.1.31-520
Obsoletes: dnf-utils < %{version}-%{release}
Obsoletes: python2-dnf-plugin-migrate < %{version}-%{release}
%description
Core Plugins for DNF. This package enhances DNF with builddep, config-manager,
@ -65,6 +70,7 @@ Obsoletes: python3-dnf-plugins-extras-debug < %{dnf_plugins_extra}
Obsoletes: python3-dnf-plugins-extras-repoclosure < %{dnf_plugins_extra}
Obsoletes: python3-dnf-plugins-extras-repograph < %{dnf_plugins_extra}
Obsoletes: python3-dnf-plugins-extras-repomanage < %{dnf_plugins_extra}
Obsoletes: python2-%{name} < %{version}-%{release}
Conflicts: %{name} <= 0.1.5 python2-%{name} < %{version}-%{release}
Conflicts: python-%{name} < %{version}-%{release}
@ -91,15 +97,68 @@ Version lock plugin takes a set of name/versions for packages and excludes all o
versions of those packages. This allows you to e.g. protect packages from being
updated by newer versions.
%package -n python3-dnf-plugin-post-transaction-actions
Summary: Post transation actions Plugin for DNF
Requires: python3-%{name} = %{version}-%{release}
Provides: dnf-plugin-post-transaction-actions = %{version}-%{release}
Conflicts: python2-dnf-plugin-post-transaction-actions < %{version}-%{release}
%description -n python3-dnf-plugin-post-transaction-actions
PosttransationactionsPlugin for DNF,Python 3 version.Plugin runs action(shell commands) after
transaction is completed.Actions are defined in action files.
%package -n python3-dnf-plugin-leaves
Summary: Leaves Plugin for DNF
Requires: python3-%{name} = %{version}-%{release}
Provides: python3-dnf-plugins-extras-leaves = %{version}-%{release} dnf-command(leaves)
Provides: dnf-plugin-leaves = %{version}-%{release}
Provides: dnf-plugins-extras-leaves = %{version}-%{release}
Conflicts: dnf-plugins-extras-common-data < %{dnf_plugins_extra}
Conflicts: python2-dnf-plugin-leaves < %{version}-%{release}
Obsoletes: python3-dnf-plugins-extras-leaves < %{dnf_plugins_extra}
%description -n python3-dnf-plugin-leaves
Leaves Plugin for DNF, Python 3 version. List all installed packages not required by any other
installed package.
%package -n python3-dnf-plugin-show-leaves
Summary: Show-leaves Plugin for DNF
Requires: python3-%{name} = %{version}-%{release}
Requires: python3-dnf-plugin-leaves = %{version}-%{release}
Provides: dnf-plugin-show-leaves = %{version}-%{release}
Provides: python3-dnf-plugins-extras-show-leaves = %{version}-%{release}
Provides: dnf-command(show-leaves) dnf-plugins-extras-show-leaves = %{version}-%{release}
Conflicts: dnf-plugins-extras-common-data < %{dnf_plugins_extra}
Conflicts: python2-dnf-plugin-show-leaves < %{version}-%{release}
Obsoletes: python3-dnf-plugins-extras-show-leaves < %{dnf_plugins_extra}
%description -n python3-dnf-plugin-show-leaves
Show-leaves Plugin for DNF, Python 3 version. List all installed packages that are no longer
required by any other installed package after a transaction.
%package -n python3-dnf-plugin-local
Summary: Local Plugin for DNF
Requires: createrepo_c python3-%{name} = %{version}-%{release}
Provides: dnf-plugin-local = %{version}-%{release}
Provides: python3-dnf-plugins-extras-local = %{version}-%{release}
Provides: dnf-plugins-extras-local = %{version}-%{release}
Conflicts: dnf-plugins-extras-common-data < %{dnf_plugins_extra}
Conflicts: python2-dnf-plugin-local < %{version}-%{release}
Obsoletes: python3-dnf-plugins-extras-local < %{dnf_plugins_extra}
%description -n python3-dnf-plugin-local
Local Plugin for DNF, Python 3 version. Automatically copy all downloaded packages to a repository
on the local filesystem and generating repo metadata.
%package_help
%prep
%autosetup
%autosetup -p1
mkdir build-py3
%build
pushd build-py3
%cmake ../ -DPYTHON_DESIRED:FILEPATH=%{__python3} -DWITHOUT_LOCAL:str=8}
%cmake ../ -DPYTHON_DESIRED:FILEPATH=%{__python3}
%make_build
make doc-man
popd
@ -154,13 +213,6 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/
%{_bindir}/yum-debug-dump
%{_bindir}/yum-debug-restore
%{_bindir}/yumdownloader
%exclude %{_mandir}/man8/dnf.plugin.leaves.*
%exclude %{_mandir}/man8/dnf.plugin.migrate.*
%exclude %{python3_sitelib}/dnf-plugins/leaves.*
%exclude %{python3_sitelib}/dnf-plugins/__pycache__/leaves.*
%exclude %{_mandir}/man8/dnf.plugin.show-leaves.*
%exclude %{python3_sitelib}/dnf-plugins/show_leaves.*
%exclude %{python3_sitelib}/dnf-plugins/__pycache__/show_leaves.*
%files -n python3-%{name} -f %{name}.lang
%license COPYING
@ -205,6 +257,24 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/
%{python3_sitelib}/dnf-plugins/versionlock.*
%{python3_sitelib}/dnf-plugins/__pycache__/versionlock.*
%files -n python3-dnf-plugin-post-transaction-actions
%config(noreplace) %{_sysconfdir}/dnf/plugins/post-transaction-actions.conf
%{python3_sitelib}/dnf-plugins/post-transaction-actions.*
%{python3_sitelib}/dnf-plugins/__pycache__/post-transaction-actions.*
%files -n python3-dnf-plugin-leaves
%{python3_sitelib}/dnf-plugins/leaves.*
%{python3_sitelib}/dnf-plugins/__pycache__/leaves.*
%files -n python3-dnf-plugin-show-leaves
%{python3_sitelib}/dnf-plugins/show_leaves.*
%{python3_sitelib}/dnf-plugins/__pycache__/show_leaves.*
%files -n python3-dnf-plugin-local
%config(noreplace) %{_sysconfdir}/dnf/plugins/local.conf
%{python3_sitelib}/dnf-plugins/local.*
%{python3_sitelib}/dnf-plugins/__pycache__/local.*
%files help
%{_mandir}/man1/debuginfo-install.*
%{_mandir}/man1/needs-restarting.*
@ -226,25 +296,51 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/
%{_mandir}/man1/repotrack.*
%{_mandir}/man8/yum-versionlock.*
%{_mandir}/man5/yum-versionlock.*
%{_mandir}/man8/dnf.plugin.versionlock.*
%{_mandir}/man8/dnf.plugin.builddep.*
%{_mandir}/man8/dnf.plugin.changelog.*
%{_mandir}/man8/dnf.plugin.config_manager.*
%{_mandir}/man8/dnf.plugin.copr.*
%{_mandir}/man8/dnf.plugin.debug.*
%{_mandir}/man8/dnf.plugin.debuginfo-install.*
%{_mandir}/man8/dnf.plugin.download.*
%{_mandir}/man8/dnf.plugin.generate_completion_cache.*
%{_mandir}/man8/dnf.plugin.needs_restarting.*
%{_mandir}/man8/dnf.plugin.repoclosure.*
%{_mandir}/man8/dnf.plugin.repodiff.*
%{_mandir}/man8/dnf.plugin.repograph.*
%{_mandir}/man8/dnf.plugin.repomanage.*
%{_mandir}/man8/dnf.plugin.reposync.*
%{_mandir}/man8/dnf-versionlock.*
%{_mandir}/man8/dnf-builddep.*
%{_mandir}/man8/dnf-changelog.*
%{_mandir}/man8/dnf-config-manager.*
%{_mandir}/man8/dnf-copr.*
%{_mandir}/man8/dnf-debug.*
%{_mandir}/man8/dnf-debuginfo-install.*
%{_mandir}/man8/dnf-download.*
%{_mandir}/man8/dnf-generate_completion_cache.*
%{_mandir}/man8/dnf-needs-restarting.*
%{_mandir}/man8/dnf-repoclosure.*
%{_mandir}/man8/dnf-repodiff.*
%{_mandir}/man8/dnf-repograph.*
%{_mandir}/man8/dnf-repomanage.*
%{_mandir}/man8/dnf-reposync.*
%{_mandir}/man1/yum-changelog.*
%{_mandir}/man8/yum-copr.*
%{_mandir}/man8/dnf-post-transaction-actions.*
%{_mandir}/man8/dnf-leaves.*
%{_mandir}/man8/dnf-show-leaves.*
%{_mandir}/man8/dnf-local.*
%changelog
* Sat Jan 22 2022 hanhui<hanhui15@huawei.com> - 4.0.17-3
- DESC:Reposync does not stop downloading packages
fix bug playground command doesn't work
* 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
* Wed Aug 26 2020 yuboyun <yuboyun@huawei.com> - 4.0.17-1
- Type:requirement
- ID:NA
- SUG:NA
- DESC:update dnf-plugins-core version to 4.0.17
* Sat Mar 21 2020 songnannan <songnannan2@huawei.com> - 4.0.11-5
- bugfix about update
* Fri Feb 28 2020 zhangrui <zhangrui182@huawei.com> -4.0.11-4
- fix fail in update
* Tue Feb 18 2020 zhangrui <zhangrui182@huawei.com> -4.0.11-3
- remove python2