diff --git a/0083-add-basic-summary-information-to-the-report.patch b/0083-add-basic-summary-information-to-the-report.patch new file mode 100644 index 0000000000000000000000000000000000000000..f908bc64d34bce93acf788890d0cc4ff56e2e009 --- /dev/null +++ b/0083-add-basic-summary-information-to-the-report.patch @@ -0,0 +1,65 @@ +From 5afe6e02fd325701cf308e0e4ad3297ac509adb3 Mon Sep 17 00:00:00 2001 +From: xuezhixin +Date: Mon, 13 Nov 2023 14:46:44 +0800 +Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=80=BB=E7=BB=93=E7=9A=84?= + =?UTF-8?q?=E5=9F=BA=E7=A1=80=E4=BF=A1=E6=81=AF=E5=88=B0=E6=8A=A5=E5=91=8A?= + =?UTF-8?q?=E5=86=85?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + sysmig_agent/Abisystmcompchk.py | 40 +++++++++++++++++++++++++++++++++ + 1 file changed, 40 insertions(+) + +diff --git a/sysmig_agent/Abisystmcompchk.py b/sysmig_agent/Abisystmcompchk.py +index 4484fef..50bd201 100644 +--- a/sysmig_agent/Abisystmcompchk.py ++++ b/sysmig_agent/Abisystmcompchk.py +@@ -732,3 +732,43 @@ def write_row_by_row(report_name_rr, row_value_list, row, column, index): + column_rr = column_rr + 1 + row_rr = row_rr + 1 + row_row_wb.save(report_name_rr) ++ ++ ++def write_summary_data(report_name_summary, index, flag): ++ summary_rb = xlrd.open_workbook(report_name_summary, formatting_info=True) ++ r_sheet = summary_rb.sheet_by_index(index) ++ summary_wb = copy(summary_rb) ++ summary_sheet = summary_wb.get_sheet(index) ++ ++ if flag == '0': ++ with open(abi_comp_chk, 'r') as fs: ++ comp_num = len(fs.readlines()) ++ before_summary_num = comp_num + incomp_pkg_num() ++ ++ before_summary_info = r_sheet.row_values(0)[0].replace('REPLACE_NUM', str(before_summary_num)) ++ summary_sheet.write(0, 0, before_summary_info) ++ summary_sheet.write(2, 0, get_cur_sys_version()) ++ ++ elif flag == '1': ++ migrbef_sysver = exp_rst_dir + 'sys-version-tmp' ++ ++ with open(abi_comp_chk, 'r') as fsp: ++ comp_num = len(fsp.readlines()) ++ ++ with open(migration_system_install, 'r') as fsmp: ++ install_comp_num = str(len(fsmp.readlines())) ++ behind_summary_num = comp_num + incomp_pkg_num() ++ ++ with open(migrbef_sysver, 'r') as file_object: ++ sys_version = file_object.read() ++ ++ # 20220107 modify lihp: keep the history data ++ # os.remove(migrbef_sysver) ++ ++ behind_summary_info_tmp = r_sheet.row_values(0)[0].replace('REPLACE_NUM', str(behind_summary_num)) ++ behind_summary_info = behind_summary_info_tmp.replace('INSTALL_NUM', install_comp_num) ++ summary_sheet.write(0, 0, behind_summary_info) ++ summary_sheet.write(2, 0, sys_version) ++ summary_sheet.write(2, 2, get_cur_sys_version()) ++ ++ summary_wb.save(report_name_summary) +-- +2.20.1 + diff --git a/migration-tools.spec b/migration-tools.spec index 5d4d62e15cec37e5d04282e366b9b544494721a5..73da1a01191535af9817c83080d2d9582ff60d82 100644 --- a/migration-tools.spec +++ b/migration-tools.spec @@ -1,6 +1,6 @@ Name: migration-tools Version: 1.0.2 -Release: 82 +Release: 83 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 @@ -89,6 +89,8 @@ Patch79: 0079-get-agent-storage-information.patch Patch80: 0080-write-the-data-of-each-row-into-report.patch Patch81: 0081-add-interface-to-export-migration-check-report.patch Patch82: 0082-write-the-data-of-each-row-and-column-into-report.patch +Patch83: 0083-add-basic-summary-information-to-the-report.patch + BuildArch: noarch BuildRequires: systemd @@ -187,6 +189,9 @@ rm -rf /usr/bin/migration-tools %endif %changelog +* Tue Nov 5 2024 xuezhixin - 1.0.2-83 +- 0083-add-basic-summary-information-to-the-report.patch + * Tue Nov 5 2024 xuezhixin - 1.0.2-82 - 0082-write-the-data-of-each-row-and-column-into-report.patch