From e1e9543180a1ef88cdc9dfd86725fce2eef86801 Mon Sep 17 00:00:00 2001 From: xuezhixin Date: Thu, 7 Nov 2024 13:23:19 +0800 Subject: [PATCH] get file list and provide file path to compare --- ...ist-and-provide-file-path-to-compare.patch | 64 +++++++++++++++++++ migration-tools.spec | 7 +- 2 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 0068-get-file-list-and-provide-file-path-to-compare.patch diff --git a/0068-get-file-list-and-provide-file-path-to-compare.patch b/0068-get-file-list-and-provide-file-path-to-compare.patch new file mode 100644 index 0000000..48ffcc9 --- /dev/null +++ b/0068-get-file-list-and-provide-file-path-to-compare.patch @@ -0,0 +1,64 @@ +From 2277378be0320a9ae296e6a02137497d53151bd3 Mon Sep 17 00:00:00 2001 +From: xuezhixin +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 + diff --git a/migration-tools.spec b/migration-tools.spec index 80843a4..dde3534 100644 --- a/migration-tools.spec +++ b/migration-tools.spec @@ -1,6 +1,6 @@ Name: migration-tools Version: 1.0.2 -Release: 67 +Release: 68 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 @@ -74,7 +74,7 @@ Patch64: 0064-get-system-package-information-in-rpm-database.patch Patch65: 0065-get-checking-envirnmnet-process.patch Patch66: 0066-check-if-file-is-binary.patch Patch67: 0067-add-an-abi-comparation-function.patch - +Patch68: 0068-get-file-list-and-provide-file-path-to-compare.patch BuildArch: noarch BuildRequires: systemd @@ -173,6 +173,9 @@ rm -rf /usr/bin/migration-tools %endif %changelog +* Tue Nov 5 2024 xuezhixin - 1.0.2-68 +- 0068-get-file-list-and-provide-file-path-to-compare.patch + * Tue Nov 5 2024 xuezhixin - 1.0.2-67 - 0067-add-an-abi-comparation-function.patch -- Gitee