!112 add kernel detection result to abi report
From: @xuezhizone Reviewed-by: @xingwei-liu Signed-off-by: @xingwei-liu
This commit is contained in:
commit
420f36bd4d
45
0059-add-kernel-detection-result-to-abi-report.patch
Normal file
45
0059-add-kernel-detection-result-to-abi-report.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From 2be33254274159375af1783396ee30b4c696d7c1 Mon Sep 17 00:00:00 2001
|
||||
From: xuezhixin <xuezhixin@uniontech.com>
|
||||
Date: Mon, 13 Nov 2023 10:06:58 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?ABI=E6=8A=A5=E5=91=8A=E5=A2=9E=E5=8A=A0?=
|
||||
=?UTF-8?q?=E5=86=85=E6=A0=B8=E6=A3=80=E6=B5=8B?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
sysmig_agent/Abisystmcompchk.py | 20 +++++++++++++++++++-
|
||||
1 file changed, 19 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sysmig_agent/Abisystmcompchk.py b/sysmig_agent/Abisystmcompchk.py
|
||||
index abe6083..fdbe2e2 100644
|
||||
--- a/sysmig_agent/Abisystmcompchk.py
|
||||
+++ b/sysmig_agent/Abisystmcompchk.py
|
||||
@@ -113,4 +113,22 @@ def abi_check_sys():
|
||||
return None
|
||||
|
||||
######################## add for test end ########################
|
||||
-######################## add for test end ########################
|
||||
\ No newline at end of file
|
||||
+######################## add for test end ########################
|
||||
+
|
||||
+#20220107 add by lihp
|
||||
+#20220112 modify by lihp: add deal kernel migration fail
|
||||
+def platform_release(Flag):
|
||||
+ if Flag == '0':
|
||||
+ cmd = "rpm -qa | grep kernel | grep -E 'an7|an8|el7|el8'"
|
||||
+ else:
|
||||
+ cmd = "rpm -qa | grep kernel | grep -E 'el7|el8|an7|an8|uelc'"
|
||||
+ kernel_version=''
|
||||
+ for line in os.popen(cmd):
|
||||
+ pattern = re.compile(r'^[-+]?[-0-9]\d*\.\d*|[-+]?\.?[0-9]\d*$')
|
||||
+ if pattern.match(line[7]):
|
||||
+ kernel_version = line.split('-',1)[1]
|
||||
+ if 'uelc' in line:
|
||||
+ break
|
||||
+ elif 'oe1' in line:
|
||||
+ break
|
||||
+ return kernel_version.rsplit('.', 1)[0]
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: migration-tools
|
||||
Version: 1.0.2
|
||||
Release: 58
|
||||
Release: 59
|
||||
License: MulanPSL-2.0
|
||||
Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
@ -65,6 +65,7 @@ Patch55: 0055-add-envirnment-detection-interface-before-migration.patch
|
||||
Patch56: 0056-modify-detection-envirnment-interface.patch
|
||||
Patch57: 0057-abi-basic-data-for-report.patch
|
||||
Patch58: 0058-get-detection-envirnment-process-interface.patch
|
||||
Patch59: 0059-add-kernel-detection-result-to-abi-report.patch
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
@ -164,6 +165,9 @@ rm -rf /usr/bin/migration-tools
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-59
|
||||
- 0059-add-kernel-detection-result-to-abi-report.patch
|
||||
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-58
|
||||
- 0058-get-detection-envirnment-process-interface.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user