Blame SOURCES/0004-system-upgrade-Show-warning-always-for-a-downstream.patch

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