!114 detection abi log
From: @xuezhizone Reviewed-by: @xingwei-liu Signed-off-by: @xingwei-liu
This commit is contained in:
commit
9cbe27bf4c
46
0061-detection-abi-log.patch
Normal file
46
0061-detection-abi-log.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From d8be08a9ea07b3500a3b6460e9325014ffcf379b Mon Sep 17 00:00:00 2001
|
||||
From: xuezhixin <xuezhixin@uniontech.com>
|
||||
Date: Mon, 13 Nov 2023 10:16:10 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?ABI=E6=A3=80=E6=B5=8B=E8=AE=B0=E5=BD=95?=
|
||||
=?UTF-8?q?=E6=97=A5=E5=BF=97?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
sysmig_agent/Abisystmcompchk.py | 21 ++++++++++++++++++++-
|
||||
1 file changed, 20 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sysmig_agent/Abisystmcompchk.py b/sysmig_agent/Abisystmcompchk.py
|
||||
index cc48f45..e442cb5 100644
|
||||
--- a/sysmig_agent/Abisystmcompchk.py
|
||||
+++ b/sysmig_agent/Abisystmcompchk.py
|
||||
@@ -160,4 +160,23 @@ def agent_ABI_check_result():
|
||||
fp = open(agent_abi_check_result, 'a')
|
||||
for rpm_name in open(abi_comp_chk):
|
||||
fp.write(rpm_name.split(',')[0] + string)
|
||||
- fp.close()
|
||||
\ No newline at end of file
|
||||
+ fp.close()
|
||||
+
|
||||
+
|
||||
+def logger_init():
|
||||
+ log_file = 'Abisystmcompchk.log' + '.' + datetime.datetime.now().strftime('%Y%m%d%H%M')
|
||||
+ log_path = '/var/tmp/uos-migration/UOS_migration_log/'
|
||||
+ if not os.path.exists(log_path):
|
||||
+ os.makedirs(log_path)
|
||||
+
|
||||
+ logger = logging.getLogger()
|
||||
+ logger.setLevel(logging.INFO)
|
||||
+ log_name = log_path + log_file
|
||||
+ logfile = log_name
|
||||
+ fh = logging.FileHandler(logfile, mode='w')
|
||||
+ fh.setLevel(logging.DEBUG)
|
||||
+ formatter = logging.Formatter("%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s")
|
||||
+ fh.setFormatter(formatter)
|
||||
+ logger.addHandler(fh)
|
||||
+
|
||||
+ return logger
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: migration-tools
|
||||
Version: 1.0.2
|
||||
Release: 60
|
||||
Release: 61
|
||||
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
|
||||
@ -67,7 +67,7 @@ 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
|
||||
Patch60: 0060-add-four-detection-item-to-abi-report.patch
|
||||
|
||||
Patch61: 0061-detection-abi-log.patch
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
@ -167,6 +167,9 @@ rm -rf /usr/bin/migration-tools
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-61
|
||||
- 0061-detection-abi-log.patch
|
||||
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-60
|
||||
- 0060-add-four-detection-item-to-abi-report.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user