import dnf-plugins-core-4.0.21-18.el8

This commit is contained in:
CentOS Sources 2023-01-12 08:10:45 +00:00 committed by Stepan Oksanichenko
parent 15d5a4d96b
commit 49b307d17b
2 changed files with 69 additions and 2 deletions

View File

@ -0,0 +1,62 @@
From dfbda502c5c46daf84e00179478de01e452f9dae Mon Sep 17 00:00:00 2001
From: Jan Kolarik <jkolarik@redhat.com>
Date: Fri, 16 Dec 2022 05:55:19 +0000
Subject: [PATCH] system-upgrade: Show warning always for a downstream
As the distro package is not available in the BaseOS, the warning implementation will be shown always, but only in related downstreams.
= changelog =
type: bugfix
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2152846
---
dnf-plugins-core.spec | 3 ++-
plugins/system_upgrade.py | 6 ++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dnf-plugins-core.spec b/dnf-plugins-core.spec
index a5ec165..0e1c9e3 100644
--- a/dnf-plugins-core.spec
+++ b/dnf-plugins-core.spec
@@ -148,13 +148,14 @@ Summary: Core Plugins for DNF
%{?python_provide:%python_provide python3-%{name}}
BuildRequires: python3-dbus
BuildRequires: python3-devel
-BuildRequires: python3-distro
BuildRequires: python3-dnf >= %{dnf_lowest_compatible}
BuildRequires: python3-systemd
BuildRequires: pkgconfig(systemd)
BuildRequires: systemd
%{?systemd_ordering}
+%if 0%{?fedora}
Requires: python3-distro
+%endif
Requires: python3-dbus
Requires: python3-dnf >= %{dnf_lowest_compatible}
Requires: python3-hawkey >= %{hawkey_version}
diff --git a/plugins/system_upgrade.py b/plugins/system_upgrade.py
index ef1de73..4f7620f 100644
--- a/plugins/system_upgrade.py
+++ b/plugins/system_upgrade.py
@@ -20,7 +20,6 @@
"""system_upgrade.py - DNF plugin to handle major-version system upgrades."""
from subprocess import call, Popen, check_output, CalledProcessError
-import distro
import json
import os
import os.path
@@ -452,9 +451,8 @@ class SystemUpgradeCommand(dnf.cli.Command):
def configure_download(self):
if 'system-upgrade' == self.opts.command or 'fedup' == self.opts.command:
- if distro.id() == 'rhel':
- logger.warning(_('WARNING: this operation is not supported on the RHEL distribution. '
- 'Proceed at your own risk.'))
+ logger.warning(_('WARNING: this operation is not supported on the RHEL distribution. '
+ 'Proceed at your own risk.'))
help_url = get_url_from_os_release()
if help_url:
msg = _('Additional information for System Upgrade: {}')
--
2.39.0

View File

@ -34,7 +34,7 @@
Name: dnf-plugins-core Name: dnf-plugins-core
Version: 4.0.21 Version: 4.0.21
Release: 17%{?dist} Release: 18%{?dist}
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
@ -66,6 +66,7 @@ Patch24: 0024-builddep-Warning-when-using-macros-with-source-rpms-.patch
Patch25: 0025-Move-system-upgrade-plugin-to-core-RhBug-2054235.patch Patch25: 0025-Move-system-upgrade-plugin-to-core-RhBug-2054235.patch
Patch26: 0026-Add-a-warning-when-using-system-upgrade-on-RHEL.patch Patch26: 0026-Add-a-warning-when-using-system-upgrade-on-RHEL.patch
Patch27: 0027-offline-upgrade-Add-security-filters.patch Patch27: 0027-offline-upgrade-Add-security-filters.patch
Patch28: 0028-system-upgrade-Show-warning-always-for-a-downstream.patch
BuildArch: noarch BuildArch: noarch
@ -177,13 +178,14 @@ Summary: Core Plugins for DNF
%{?python_provide:%python_provide python3-%{name}} %{?python_provide:%python_provide python3-%{name}}
BuildRequires: python3-dbus BuildRequires: python3-dbus
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-distro
BuildRequires: python3-dnf >= %{dnf_lowest_compatible} BuildRequires: python3-dnf >= %{dnf_lowest_compatible}
BuildRequires: python3-systemd BuildRequires: python3-systemd
BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(systemd)
BuildRequires: systemd BuildRequires: systemd
%{?systemd_ordering} %{?systemd_ordering}
%if 0%{?fedora}
Requires: python3-distro Requires: python3-distro
%endif
Requires: python3-dbus Requires: python3-dbus
Requires: python3-dnf >= %{dnf_lowest_compatible} Requires: python3-dnf >= %{dnf_lowest_compatible}
Requires: python3-hawkey >= %{hawkey_version} Requires: python3-hawkey >= %{hawkey_version}
@ -841,6 +843,9 @@ ln -sf %{_mandir}/man1/%{yum_utils_subpackage_name}.1.gz %{buildroot}%{_mandir}/
%endif %endif
%changelog %changelog
* Thu Jan 05 2023 Nicola Sella <nsella@redhat.com> - 4.0.21-18
- Show downstream warning during system-upgrade
* Wed Nov 30 2022 Nicola Sella <nsella@redhat.com> - 4.0.21-17 * Wed Nov 30 2022 Nicola Sella <nsella@redhat.com> - 4.0.21-17
- offline-upgrade: add support for security filters (RhBug:1939975,2139324) - offline-upgrade: add support for security filters (RhBug:1939975,2139324)
- Move system-upgrade plugin to core (RhBug:2054235) - Move system-upgrade plugin to core (RhBug:2054235)