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

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