From 4db91e9db66bed1ee0c9b58f1affc03d4f51ea72 Mon Sep 17 00:00:00 2001 From: Yuriy Kohut Date: Tue, 4 Mar 2025 16:34:27 +0200 Subject: [PATCH] Correct the list of leapp and leapp-repository rpms, that should be preserved during the 9to10 upgrade --- SOURCES/leapp-repository-0.22.0-elevate.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/SOURCES/leapp-repository-0.22.0-elevate.patch b/SOURCES/leapp-repository-0.22.0-elevate.patch index d95e894..f52b039 100644 --- a/SOURCES/leapp-repository-0.22.0-elevate.patch +++ b/SOURCES/leapp-repository-0.22.0-elevate.patch @@ -5134,6 +5134,40 @@ index 2ed5eacd..219d31d1 100644 + distro_config_json["keys"].extend(siglist.sigs) + + return distro_config_json +diff --git a/repos/system_upgrade/common/libraries/dnfconfig.py b/repos/system_upgrade/common/libraries/dnfconfig.py +index 5b8180f0..4b5afeb5 100644 +--- a/repos/system_upgrade/common/libraries/dnfconfig.py ++++ b/repos/system_upgrade/common/libraries/dnfconfig.py +@@ -1,28 +1,8 @@ + from leapp.exceptions import StopActorExecutionError +-from leapp.libraries.common.config.version import get_source_major_version ++from leapp.libraries.common.rpms import get_leapp_packages + from leapp.libraries.stdlib import api, CalledProcessError + + +-def get_leapp_packages(): +- """ +- Return the list of leapp and leapp-repository rpms that should be preserved +- during the upgrade. +- +- It's list of packages that should be preserved, not what is really +- installed. +- +- The snactor RPM doesn't have to be installed, but if so, we have to take +- care about that too as well to prevent broken dnf transaction. +- """ +- # TODO: should we set the seatbelt and exclude leapp RPMs from the target +- # system too? +- generic = ['leapp', 'snactor'] +- if get_source_major_version() == '7': +- return generic + ['python2-leapp', 'leapp-upgrade-el7toel8'] +- +- return generic + ['python3-leapp', 'leapp-upgrade-el8toel9'] +- +- + def _strip_split(data, sep, maxsplit=-1): + """ + Just like str.split(), but remove ambient whitespaces from all items diff --git a/repos/system_upgrade/common/libraries/dnfplugin.py b/repos/system_upgrade/common/libraries/dnfplugin.py index 4f0c3a99..0f31f101 100644 --- a/repos/system_upgrade/common/libraries/dnfplugin.py