54 lines
1.6 KiB
Diff
54 lines
1.6 KiB
Diff
From b21342f766124ff7fbb737fa882329ae7873d970 Mon Sep 17 00:00:00 2001
|
|
From: xuezhixin <xuezhixin@uniontech.com>
|
|
Date: Mon, 13 Nov 2023 10:30:03 +0800
|
|
Subject: [PATCH] =?UTF-8?q?ABI=E6=8A=A5=E5=91=8A=E5=A2=9E=E5=8A=A0?=
|
|
=?UTF-8?q?=E8=BD=AF=E4=BB=B6=E5=8C=85=E5=AF=B9=E6=AF=94?=
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
---
|
|
sysmig_agent/Abisystmcompchk.py | 29 +++++++++++++++++++++++++++++
|
|
1 file changed, 29 insertions(+)
|
|
|
|
diff --git a/sysmig_agent/Abisystmcompchk.py b/sysmig_agent/Abisystmcompchk.py
|
|
index 541e9a8..7a810f9 100644
|
|
--- a/sysmig_agent/Abisystmcompchk.py
|
|
+++ b/sysmig_agent/Abisystmcompchk.py
|
|
@@ -202,3 +202,32 @@ def is_ELFfile(filepath, logger):
|
|
# logger.info(str(e))
|
|
pass
|
|
return False
|
|
+
|
|
+
|
|
+#Get migration behind rpm list, filter dist of '.uelc20'
|
|
+def get_migrate_behind_rpm_pkg():
|
|
+ dist='.uelc20'
|
|
+ migration_before_uelc20_rpm = exp_rst_dir + 'migration-before-uelc20-rpm.csv'
|
|
+ migration_behind_uelc20_rpm = exp_rst_dir + 'migration-behind-uelc20-rpm.csv'
|
|
+
|
|
+ rpm_pkg_list=[]
|
|
+
|
|
+ ts = rpm.TransactionSet()
|
|
+ mi = ts.dbMatch()
|
|
+
|
|
+ fhu = open(migration_behind_uelc20_rpm, 'w')
|
|
+ if system_version_id() == '7':
|
|
+ for rpm_pkg in mi:
|
|
+ if dist in rpm_pkg['release'].decode():
|
|
+ fhu.write(rpm_pkg['name'].decode()+'\n')
|
|
+ rpm_pkg_list.append(rpm_pkg['name'].decode())
|
|
+ else:
|
|
+ for rpm_pkg in mi:
|
|
+ if dist in rpm_pkg['release']:
|
|
+ fhu.write(rpm_pkg['name']+'\n')
|
|
+ rpm_pkg_list.append(rpm_pkg['name'])
|
|
+ fcw.close()
|
|
+
|
|
+ return rpm_pkg_list
|
|
+
|
|
+
|
|
--
|
|
2.20.1
|
|
|