From 0cd8e4faa03d5f084a4ee36edd0e032a24e1f4cd Mon Sep 17 00:00:00 2001 From: tomtao <1450026690@qq.com> Date: Fri, 25 Sep 2020 18:48:40 +0800 Subject: [PATCH] In the selfbuild scenario, add the error message that the software package cannot be found --- 0008-fix-selfbuild-error-message.patch | 12 ++++++++++++ pkgship.spec | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 0008-fix-selfbuild-error-message.patch diff --git a/0008-fix-selfbuild-error-message.patch b/0008-fix-selfbuild-error-message.patch new file mode 100644 index 0000000..30ec7a4 --- /dev/null +++ b/0008-fix-selfbuild-error-message.patch @@ -0,0 +1,12 @@ +diff -Naru pkgship-1.1.0/packageship/application/apps/package/function/searchdb.py pkgship/packageship/application/apps/package/function/searchdb.py +--- pkgship-1.1.0/packageship/application/apps/package/function/searchdb.py 2020-09-25 17:28:16.230216100 +0800 ++++ pkgship/packageship/application/apps/package/function/searchdb.py 2020-09-25 17:30:48.456873100 +0800 +@@ -909,6 +909,8 @@ + current_app.logger.error(attr_error) + except SQLAlchemyError as sql_error: + current_app.logger.error(sql_error) ++ if not result_list: ++ return ResponseCode.PACK_NAME_NOT_FOUND, result_list + return_tuple = namedtuple( + 'return_tuple', 'subpack_name sub_pack_version search_version search_name') + for search_name in search_set: diff --git a/pkgship.spec b/pkgship.spec index 5459d28..3ab3333 100644 --- a/pkgship.spec +++ b/pkgship.spec @@ -1,6 +1,6 @@ Name: pkgship Version: 1.1.0 -Release: 11 +Release: 12 Summary: Pkgship implements rpm package dependence ,maintainer, patch query and so no. License: Mulan 2.0 URL: https://gitee.com/openeuler/openEuler-Advisor @@ -31,6 +31,9 @@ Patch5: 0006-fix-memory_caused-service-crash-and-data-duplication-issue. # Fix the problem of function parameters Patch6: 0007-fix-the-problem-of-function-parameters.patch +# Fix the selfbuild error message +Patch7: 0008-fix-selfbuild-error-message.patch + BuildArch: noarch BuildRequires: python3-flask-restful python3-flask python3 python3-pyyaml python3-sqlalchemy @@ -79,6 +82,9 @@ rm -rf $log_path %attr(0755,root,root) %{_bindir}/pkgship %changelog +* Fri Sep 25 2020 Zhang Tao - 1.1.0-12 +- In the selfbuild scenario, add the error message that the software package cannot be found + * Fri Sep 25 2020 Zhang Tao - 1.1.0-11 - Fix the problem of function parameters