migration-tools/0077-copy-from-unzip-rpm-diractory-and-system-file-to-compatility-diractory.patch

40 lines
1.2 KiB
Diff

From e4bfbc6e0d5ecf6768a24e8ae173c0bd39b667b1 Mon Sep 17 00:00:00 2001
From: xuezhixin <xuezhixin@uniontech.com>
Date: Mon, 13 Nov 2023 14:11:10 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A4=8D=E5=88=B6=E8=A7=A3=E5=8E=8B=E7=9A=84rp?=
=?UTF-8?q?m=E6=96=87=E4=BB=B6=E5=88=B0=E5=92=8C=E7=B3=BB=E7=BB=9F?=
=?UTF-8?q?=E6=96=87=E4=BB=B6=E5=88=B0=E5=AF=B9=E6=AF=94=E7=9B=AE=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sysmig_agent/Abisystmcompchk.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sysmig_agent/Abisystmcompchk.py b/sysmig_agent/Abisystmcompchk.py
index d14581b..cf34c87 100644
--- a/sysmig_agent/Abisystmcompchk.py
+++ b/sysmig_agent/Abisystmcompchk.py
@@ -628,3 +628,17 @@ def get_cur_sys_info_list():
fpbsi.write('13|1|' + str(sum_num) + '\n')
return list_info
+
+
+def mycopyfile(srcfile, dstfile, logger):
+ if not os.path.exists(srcfile):
+ logger.info("Please check!!!! src file not exit:" + srcfile)
+ return False
+ else:
+ fpath,fname=os.path.split(dstfile)
+ if not os.path.exists(fpath):
+ os.makedirs(fpath)
+ copyfile(srcfile,dstfile)
+
+ return dstfile
+
--
2.20.1