From 4e9ba112373a6c8d58d46e1411dc58acf806c772 Mon Sep 17 00:00:00 2001 From: xuezhixin Date: Wed, 6 Nov 2024 14:26:12 +0800 Subject: [PATCH] add interface to check repository result --- ...interface-to-check-repository-result.patch | 46 +++++++++++++++++++ migration-tools.spec | 7 ++- 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 0049-add-interface-to-check-repository-result.patch diff --git a/0049-add-interface-to-check-repository-result.patch b/0049-add-interface-to-check-repository-result.patch new file mode 100644 index 0000000..f89fc08 --- /dev/null +++ b/0049-add-interface-to-check-repository-result.patch @@ -0,0 +1,46 @@ +From 7cbf75c501a0c8bc21c2c9ca041b3f283ec4a0ca Mon Sep 17 00:00:00 2001 +From: lixin +Date: Fri, 10 Nov 2023 15:07:45 +0800 +Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=BD=AF=E4=BB=B6=E4=BB=93?= + =?UTF-8?q?=E5=BA=93=E6=A3=80=E6=B5=8B=E7=BB=93=E6=9E=9C=E6=8E=A5=E5=8F=A3?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + index.py | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/index.py b/index.py +index 9665e29..d76404e 100644 +--- a/index.py ++++ b/index.py +@@ -32,6 +32,7 @@ mods = { + 'check_kernel': migration.check_kernel, + 'get_kernel_data': server.get_kernel_data, + 'check_repo': migration.check_repo, ++ 'get_repo_data': server.get_repo_data, + } + + +@@ -133,6 +134,17 @@ def check_repo(): + return Response(mod, content_type='application/json') + + ++@app.route('/get_repo_data', methods=['GET', 'POST']) ++def get_repo_data(): ++ """ ++ 定时检查软件仓库检测结果 ++ :return: ++ """ ++ mod = check_methods() ++ if mod: ++ return Response(mod, content_type='application/json') ++ ++ + @app.route('/', methods=['GET', 'POST']) + def MT_index(): + """ +-- +2.20.1 + diff --git a/migration-tools.spec b/migration-tools.spec index af6bb82..fa23cc4 100644 --- a/migration-tools.spec +++ b/migration-tools.spec @@ -1,6 +1,6 @@ Name: migration-tools Version: 1.0.2 -Release: 48 +Release: 49 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 @@ -55,7 +55,7 @@ Patch45: 0045-modify-repository-file.patch Patch46: 0046-agent-sends-task-update-requrst-to-the-server.patch Patch47: 0047-check-kernel-version-in-repository.patch Patch48: 0048-server-send-kernel-detection-task.patch - +Patch49: 0049-add-interface-to-check-repository-result.patch BuildArch: noarch BuildRequires: systemd @@ -154,6 +154,9 @@ rm -rf /usr/bin/migration-tools %endif %changelog +* Tue Nov 5 2024 xuezhixin - 1.0.2-49 +- 0049-add-interface-to-check-repository-result.patch + * Tue Nov 5 2024 xuezhixin - 1.0.2-48 - 0048-server-send-kernel-detection-task.patch -- Gitee