!122 get package list downloaded locally from the software repository

From: @xuezhizone 
Reviewed-by: @xingwei-liu 
Signed-off-by: @xingwei-liu
This commit is contained in:
openeuler-ci-bot 2024-11-07 06:12:26 +00:00 committed by Gitee
commit 446fae191f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 59 additions and 1 deletions

View File

@ -0,0 +1,52 @@
From e87ba07ce71ff048e6a7acb51230b09db4f5fd3b Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 10:55:30 +0800
Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=BD=AF=E4=BB=B6=E6=BA=90?=
=?UTF-8?q?=E4=B8=8B=E8=BD=BD=E5=88=B0=E6=9C=AC=E5=9C=B0=E7=9A=84=E8=BD=AF?=
=?UTF-8?q?=E4=BB=B6=E5=8C=85=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sysmig_agent/Abisystmcompchk.py | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/sysmig_agent/Abisystmcompchk.py b/sysmig_agent/Abisystmcompchk.py
index 438fc2d..bac4205 100644
--- a/sysmig_agent/Abisystmcompchk.py
+++ b/sysmig_agent/Abisystmcompchk.py
@@ -491,4 +491,28 @@ def process_data(threadName, q, queueLock, incompfw, compfw, Queue, pro_log):
pro_log.info('message tup queue:' + str(msg_tup))
queueLock.release()
else:
- queueLock.release()
\ No newline at end of file
+ queueLock.release()
+
+
+def get_system_pkg_list(migbeflist):
+ download_rpm_nums = 0
+ migration_rpm_pkg_path = local_dir + 'uos/rpms'
+
+ #clean history data
+ if os.path.exists(migration_system_total):
+ os.remove(migration_system_total)
+
+ ftw = open(migration_system_total, 'w')
+ items = os.listdir(migration_rpm_pkg_path)
+ newlist = []
+ for names in items:
+ if names.endswith(".rpm"):
+ ftw.write(names.rsplit('-',1)[0].rsplit('-',1)[0] + '\n')
+ migbeflist.append(names.rsplit('-',1)[0].rsplit('-',1)[0])
+ newlist.append(names)
+ download_rpm_nums = download_rpm_nums + 1
+ ftw.close()
+ if download_rpm_nums:
+ return newlist
+ else:
+ return False
--
2.20.1

View File

@ -1,6 +1,6 @@
Name: migration-tools
Version: 1.0.2
Release: 68
Release: 69
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
@ -75,6 +75,9 @@ 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
Patch69: 0069-get-package-list-downloaded-locally-from-the-software-repository.patch
BuildArch: noarch
BuildRequires: systemd
@ -173,6 +176,9 @@ rm -rf /usr/bin/migration-tools
%endif
%changelog
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-69
- 0069-get-package-list-downloaded-locally-from-the-software-repository.patch
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-68
- 0068-get-file-list-and-provide-file-path-to-compare.patch