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

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