Update ELevate vendors patch: IPU workflow config actor uses distro.version() if python minor version >= 9 (like 3.9)
The package .spec: - add python3-distro package to EL9's Requires - bump release
This commit is contained in:
parent
a3be08801c
commit
dd292236c9
@ -3741,14 +3741,25 @@ index 5ccdb35b..b5002ba0 100644
|
||||
modules_to_reset=list(modules_to_reset.values()),
|
||||
modules_to_enable=list(modules_to_enable.values())))
|
||||
diff --git a/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py b/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
index 9e213f64..52cfe14f 100644
|
||||
index 9e213f64..7e0462e8 100644
|
||||
--- a/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
+++ b/repos/system_upgrade/common/actors/ipuworkflowconfig/libraries/ipuworkflowconfig.py
|
||||
@@ -47,15 +47,20 @@ def get_os_release(path):
|
||||
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
+import sys
|
||||
import platform
|
||||
|
||||
from leapp.exceptions import StopActorExecutionError
|
||||
@@ -47,15 +48,25 @@ def get_os_release(path):
|
||||
:return: `OSRelease` model if the file can be parsed
|
||||
:raises: `IOError`
|
||||
"""
|
||||
+ os_version = '.'.join(platform.dist()[1].split('.')[:2])
|
||||
+ if sys.version_info.minor < 9:
|
||||
+ os_version = platform.dist()[1]
|
||||
+ else:
|
||||
+ import distro
|
||||
+ os_version = distro.version()
|
||||
+ os_version = '.'.join(os_version.split('.')[:2])
|
||||
try:
|
||||
with open(path) as f:
|
||||
data = dict(l.strip().split('=', 1) for l in f.readlines() if '=' in l)
|
||||
|
@ -53,7 +53,7 @@ py2_byte_compile "%1" "%2"}
|
||||
Epoch: 1
|
||||
Name: leapp-repository
|
||||
Version: 0.21.0
|
||||
Release: 4%{?dist}.elevate.4
|
||||
Release: 4%{?dist}.elevate.5
|
||||
Summary: Repositories for leapp
|
||||
|
||||
License: ASL 2.0
|
||||
@ -260,6 +260,7 @@ Requires: python3-gobject-base
|
||||
############# RHEL 9 dependencies (when the source system is RHEL 9) ##########
|
||||
# Required to convert pam_userdb database from BerkeleyDB to GDBM
|
||||
Requires: libdb-utils
|
||||
Requires: python3-distro
|
||||
%endif
|
||||
##################################################
|
||||
# end requirement
|
||||
@ -402,7 +403,12 @@ done;
|
||||
# no files here
|
||||
|
||||
%changelog
|
||||
* Wed Dec 11 2024 Yuriy Kohut <ykohut@almalinux.org> - 0.21.0-4.elevate.4
|
||||
* Thu Dec 12 2024 Yuriy Kohut <ykohut@almalinux.org> - 0.21.0-4.elevate.5
|
||||
- Update ELevate patch:
|
||||
- IPU workflow config actor: use distro.version() if python minor version >= 9 (like 3.9)
|
||||
- Add python3-distro package to EL9's Requires
|
||||
|
||||
* Wed Dec 11 2024 Yuriy Kohut <ykohut@almalinux.org> - 0.21.0-4.elevate.5
|
||||
- Update ELevate patch:
|
||||
- drop EuroLinux support
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user