From 092ea5e7c5b8a453bcd30be5fefb0e2ecab752c4 Mon Sep 17 00:00:00 2001 From: Yuriy Kohut Date: Mon, 3 Mar 2025 15:36:43 +0200 Subject: [PATCH 01/37] Use leapp.libraries.common.rpms.get_leapp_packages (which is backward compatible) to get the list of leapp and leapp-repository rpms, that should be preserved during the 9to10 upgrade Do not import get_source_major_version as it isn't used anywhere --- .../common/libraries/dnfconfig.py | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) 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 -- 2.49.0