migration-tools/0031-migration-check-and-extract-macros.patch
2024-11-05 17:47:25 +08:00

73 lines
3.1 KiB
Diff

From 1d617ae642fc8236c2ec2cb8b0782a7584987771 Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Fri, 10 Nov 2023 11:27:00 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=A3=80=E6=B5=8B=E5=92=8C?=
=?UTF-8?q?=E9=83=A8=E5=88=86=E5=AE=8F=E6=8F=90=E5=8F=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sysmig_agent/share.py | 38 +++++++++++++++++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/sysmig_agent/share.py b/sysmig_agent/share.py
index 6b8da14..57bef1e 100644
--- a/sysmig_agent/share.py
+++ b/sysmig_agent/share.py
@@ -14,6 +14,43 @@ import logging
sys.path.append("..")
from connect_sql import DBHelper
+defaultencoding = 'utf-8'
+# logdss = Logger('./logdss.log',logging.DEBUG,logging.DEBUG)
+new_os = '统信服务器操作系统V20({})'
+AGENT_DIR = '/var/tmp/uos-migration/'
+PRE_MIG = '/var/tmp/uos-migration/UOS_analysis_report/rpmva-before.txt'
+PRE_MIG_DIR = '/var/tmp/uos-migration/UOS_analysis_report'
+MIGRATION_DIR = '/var/tmp/uos-migration/UOS_migration_log'
+MIGRATION_REPORT_DIR = '/var/tmp/uos-migration/UOS_migration_completed_report'
+
+
+PROGRESS = '/var/tmp/uos-migration/.progress'
+RPMS = '/var/tmp/uos-migration/.rpms'
+MIGRATION_KERNEL = '/var/tmp/uos-migration/kernel'
+MIGRATION_LOG = '/var/tmp/uos-migration/UOS_migration_log/log'
+MIGRATION_DATA_RPMS_DIR = '/var/tmp/uos-migration/data/exp-rst'
+MIGRATION_DATA_RPMS_3_INFO = '/var/tmp/uos-migration/data/exp-rst/pkginfo_3.txt'
+pstate = '/var/tmp/uos-migration/.state'
+
+abi_file = '/var/tmp/uos-migration/data/exp-rst/agent_ABI_check_result.csv'
+#Abi
+local_dir = '/var/tmp/uos-migration/data/'
+exp_rst_dir = local_dir+'exp-rst/'
+
+current_system_unique = exp_rst_dir + 'current-system-unique.csv'
+migration_system_install = exp_rst_dir + 'migration-system-install.csv'
+migration_system_total = exp_rst_dir + 'migration-system-total.csv'
+abi_comp_chk = exp_rst_dir + 'abi-comp-chk.csv'
+abi_incomp_chk = exp_rst_dir + 'abi-incomp-chk.csv'
+exitFlag = 0
+total_rpm_nums = 0
+percentage = ''
+deal_rpm_num = 0
+agent_abi_check_result = exp_rst_dir + 'agent_ABI_check_result.csv'
+suffix_list = ['.mo', '.gz', '.xml', '.conf', '.png', '.page', '.woff', '.ttf', '.pyc', '.typelib', '.pdf', '.ppt', '.txt', '.ico', '.icc', '.tcc', '.gif', '.oga', '.rom', '.jpg', '.dict', '.webm', '.pyc', '.wav', '.ucode', '.ttc', '.gresource', '.otf', '.t1', '.db', '.elc', '.cache', '.fd', '.iso', '.efi', '.mmdb', '.bz2', '.img', '.bin', '.fw', '.cis', '.itb', '.inp', '.sbcf', '.ddc', '.sfi', '.bseq', '.mfa2', '.chk', '.mgc', '.stub', '.dfu', '.dat', '.sys', '.bts', '.dlmem', '.brd', '.hwm', '.pwd', '.pwi', '.exe', '.der', '.p12', '.ogg', '.signed', '.dafsa', '.gpg', '.tri', '.x86_64']
+
+
+
def get_local_ip():
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
@@ -379,7 +416,6 @@ def sql_os_newversion(localos):
def get_new_osversion():
- new_os = '统信服务器操作系统V20({})'
path = '/etc/os-version'
if os.path.exists(path):
with open(path,'r') as v:
--
2.20.1