In the selfbuild scenario, add the error message that the software package cannot be found

This commit is contained in:
tomtao 2020-09-25 18:48:40 +08:00
parent c6a9c05c53
commit 0cd8e4faa0
2 changed files with 19 additions and 1 deletions

View File

@ -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:

View File

@ -1,6 +1,6 @@
Name: pkgship Name: pkgship
Version: 1.1.0 Version: 1.1.0
Release: 11 Release: 12
Summary: Pkgship implements rpm package dependence ,maintainer, patch query and so no. Summary: Pkgship implements rpm package dependence ,maintainer, patch query and so no.
License: Mulan 2.0 License: Mulan 2.0
URL: https://gitee.com/openeuler/openEuler-Advisor 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 # Fix the problem of function parameters
Patch6: 0007-fix-the-problem-of-function-parameters.patch Patch6: 0007-fix-the-problem-of-function-parameters.patch
# Fix the selfbuild error message
Patch7: 0008-fix-selfbuild-error-message.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: python3-flask-restful python3-flask python3 python3-pyyaml python3-sqlalchemy 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 %attr(0755,root,root) %{_bindir}/pkgship
%changelog %changelog
* Fri Sep 25 2020 Zhang Tao <zhangtao307@huawei.com> - 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 <zhangtao307@huawei.com> - 1.1.0-11 * Fri Sep 25 2020 Zhang Tao <zhangtao307@huawei.com> - 1.1.0-11
- Fix the problem of function parameters - Fix the problem of function parameters