Skip to content

Commit 092ea5e

Browse files
yuravkpirat89
authored andcommitted
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
1 parent 5187220 commit 092ea5e

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

repos/system_upgrade/common/libraries/dnfconfig.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,8 @@
11
from leapp.exceptions import StopActorExecutionError
2-
from leapp.libraries.common.config.version import get_source_major_version
2+
from leapp.libraries.common.rpms import get_leapp_packages
33
from leapp.libraries.stdlib import api, CalledProcessError
44

55

6-
def get_leapp_packages():
7-
"""
8-
Return the list of leapp and leapp-repository rpms that should be preserved
9-
during the upgrade.
10-
11-
It's list of packages that should be preserved, not what is really
12-
installed.
13-
14-
The snactor RPM doesn't have to be installed, but if so, we have to take
15-
care about that too as well to prevent broken dnf transaction.
16-
"""
17-
# TODO: should we set the seatbelt and exclude leapp RPMs from the target
18-
# system too?
19-
generic = ['leapp', 'snactor']
20-
if get_source_major_version() == '7':
21-
return generic + ['python2-leapp', 'leapp-upgrade-el7toel8']
22-
23-
return generic + ['python3-leapp', 'leapp-upgrade-el8toel9']
24-
25-
266
def _strip_split(data, sep, maxsplit=-1):
277
"""
288
Just like str.split(), but remove ambient whitespaces from all items

0 commit comments

Comments
 (0)