65 lines
2.5 KiB
Diff
65 lines
2.5 KiB
Diff
From 2277378be0320a9ae296e6a02137497d53151bd3 Mon Sep 17 00:00:00 2001
|
|
From: xuezhixin <xuezhixin@uniontech.com>
|
|
Date: Mon, 13 Nov 2023 10:51:30 +0800
|
|
Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=96=87=E4=BB=B6=E5=88=97?=
|
|
=?UTF-8?q?=E8=A1=A8=EF=BC=8C=E6=8F=90=E4=BE=9B=E6=96=87=E4=BB=B6=E5=AF=B9?=
|
|
=?UTF-8?q?=E6=AF=94=E8=B7=AF=E5=BE=84?=
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
---
|
|
sysmig_agent/Abisystmcompchk.py | 37 ++++++++++++++++++++++++++++++++-
|
|
1 file changed, 36 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/sysmig_agent/Abisystmcompchk.py b/sysmig_agent/Abisystmcompchk.py
|
|
index d3c09e6..438fc2d 100644
|
|
--- a/sysmig_agent/Abisystmcompchk.py
|
|
+++ b/sysmig_agent/Abisystmcompchk.py
|
|
@@ -456,4 +456,39 @@ def deal_files_list(fwincomp, fwcomp, cur_file_list, trn_file_list, rpm_full_pkg
|
|
else:
|
|
continue
|
|
if comp_flag:
|
|
- fwcomp.write(rpm_pkg_name + ',' + ',' + ',' + 'Y,' + ',' + '\n')
|
|
\ No newline at end of file
|
|
+ fwcomp.write(rpm_pkg_name + ',' + ',' + ',' + 'Y,' + ',' + '\n')
|
|
+
|
|
+
|
|
+def process_data(threadName, q, queueLock, incompfw, compfw, Queue, pro_log):
|
|
+ global exitFlag
|
|
+ global total_rpm_nums
|
|
+ global percentage
|
|
+ global deal_rpm_num
|
|
+ status = '1'
|
|
+
|
|
+ rpm_pkg_path = local_dir + 'uos/rpms/'
|
|
+
|
|
+ abisys =str(abi_check_sys())
|
|
+ while not exitFlag:
|
|
+ queueLock.acquire()
|
|
+ if not workQueue.empty():
|
|
+ rpm_full_name=q.get()
|
|
+ rpm_pkg_name=rpm_full_name.rsplit('-',2)[0]
|
|
+ rpm_path_name=rpm_pkg_path + rpm_full_name
|
|
+ if '7' == abisys:
|
|
+ print('----------7-0---------')
|
|
+ list_file_cur=list(os.popen('rpm -ql %s ' %(rpm_pkg_name)))
|
|
+ list_file_trn=list(os.popen('rpm -qpl %s ' %(rpm_path_name)))
|
|
+ else:
|
|
+ list_file_cur=list(os.popen('rpm -ql --noartifact %s ' %(rpm_pkg_name)))
|
|
+ list_file_trn=list(os.popen('rpm -qpl --noartifact %s ' %(rpm_path_name)))
|
|
+ os.system('rpm2cpio %s | cpio -idmv' %(rpm_full_name))
|
|
+ deal_files_list(incompfw, compfw, list_file_cur, list_file_trn, rpm_full_name, pro_log)
|
|
+ deal_rpm_num = deal_rpm_num + 1
|
|
+ percentage = ("%d" % (deal_rpm_num/total_rpm_nums*100))
|
|
+ msg_tup = (percentage, status)
|
|
+ Queue.put(msg_tup)
|
|
+ pro_log.info('message tup queue:' + str(msg_tup))
|
|
+ queueLock.release()
|
|
+ else:
|
|
+ queueLock.release()
|
|
\ No newline at end of file
|
|
--
|
|
2.20.1
|
|
|