From 5f2c0ff929e6d168786cd48b9740046c030515e6 Mon Sep 17 00:00:00 2001 From: tomtao <1450026690@qq.com> Date: Mon, 12 Oct 2020 17:48:40 +0800 Subject: [PATCH] correct-the-parameter-transfer-method-and-change-the-status-recording-method --- ...d-change-the-status-recording-method.patch | 80 ++++++++++++++----- pkgship.spec | 9 ++- 2 files changed, 64 insertions(+), 25 deletions(-) rename 0007-fix-the-problem-of-function-parameters.patch => 0007-correct-the-parameter-transfer-method-and-change-the-status-recording-method.patch (68%) diff --git a/0007-fix-the-problem-of-function-parameters.patch b/0007-correct-the-parameter-transfer-method-and-change-the-status-recording-method.patch similarity index 68% rename from 0007-fix-the-problem-of-function-parameters.patch rename to 0007-correct-the-parameter-transfer-method-and-change-the-status-recording-method.patch index ec3170d..f3f6480 100644 --- a/0007-fix-the-problem-of-function-parameters.patch +++ b/0007-correct-the-parameter-transfer-method-and-change-the-status-recording-method.patch @@ -1,50 +1,74 @@ -diff -Naru pkgship-1.1.0/packageship/application/apps/package/function/build_depend.py pkgship/packageship/application/apps/package/function/build_depend.py ---- pkgship-1.1.0/packageship/application/apps/package/function/build_depend.py 2020-09-25 11:00:55.148080400 +0800 -+++ pkgship/packageship/application/apps/package/function/build_depend.py 2020-09-25 10:59:35.218547000 +0800 -@@ -89,7 +89,7 @@ +diff -Naru pkgship-1.1.0/packageship/application/apps/package/function/build_depend.py pkg/packageship/application/apps/package/function/build_depend.py +--- pkgship-1.1.0/packageship/application/apps/package/function/build_depend.py 2020-10-13 13:57:13.529049796 +0800 ++++ pkg/packageship/application/apps/package/function/build_depend.py 2020-10-13 13:58:37.670278333 +0800 +@@ -89,9 +89,9 @@ build_list, not_fd_com_build, pk_v - ) = self.search_db.get_build_depend(pkg_list, self.__already_pk_val) + ) = self.search_db.get_build_depend(pkg_list, pk_value=self.__already_pk_val) - self.__already_pk_val += pk_v +- self.__already_pk_val += pk_v ++ self.__already_pk_val = pk_v self.not_found_components.update(not_fd_com_build) + if not build_list: + return res_status if res_status == ResponseCode.DIS_CONNECTION_DB else \ @@ -102,8 +102,8 @@ code, res_dict, not_fd_com_install = \ InstallDepend(self.db_list).query_install_depend(search_list, - self.history_dicts, - self.__already_pk_val) -+ history_pk_val=self.history_dicts, -+ history_dicts=self.__already_pk_val) ++ history_pk_val=self.__already_pk_val, ++ history_dicts=self.history_dicts) self.not_found_components.update(not_fd_com_install) if not res_dict: return code -@@ -206,7 +206,7 @@ +@@ -206,8 +206,8 @@ not_fd_com, pk_v ) = self.search_db.get_build_depend(pkg_name_li, - self.__already_pk_val) +- self.__already_pk_val += pk_v + pk_value=self.__already_pk_val) - self.__already_pk_val += pk_v ++ self.__already_pk_val = pk_v self.not_found_components.update(not_fd_com) if not bin_info_lis: -diff -Naru pkgship-1.1.0/packageship/application/apps/package/function/install_depend.py pkgship/packageship/application/apps/package/function/install_depend.py ---- pkgship-1.1.0/packageship/application/apps/package/function/install_depend.py 2020-09-25 11:00:55.152079600 +0800 -+++ pkgship/packageship/application/apps/package/function/install_depend.py 2020-09-25 10:59:35.225545800 +0800 -@@ -85,7 +85,7 @@ - result_list, not_found_components, pk_val = map( - set, - self.__search_db.get_install_depend(self.__search_list, + return +diff -Naru pkgship-1.1.0/packageship/application/apps/package/function/install_depend.py pkg/packageship/application/apps/package/function/install_depend.py +--- pkgship-1.1.0/packageship/application/apps/package/function/install_depend.py 2020-10-13 13:57:13.529049796 +0800 ++++ pkg/packageship/application/apps/package/function/install_depend.py 2020-10-13 13:58:37.680278477 +0800 +@@ -68,7 +68,7 @@ + self.__search_list.append(binary) + else: + LOGGER.logger.warning("There is a NONE in input value: %s", str(binary_list)) +- self.__already_pk_value += history_pk_val if history_pk_val else [] ++ self.__already_pk_value = history_pk_val if history_pk_val else [] + while self.__search_list: + self.__query_single_install_dep(history_dicts) + return ResponseCode.SUCCESS, self.binary_dict.dictionary, self.not_found_components +@@ -82,14 +82,11 @@ + response_code: response code + Raises: + """ +- result_list, not_found_components, pk_val = map( +- set, +- self.__search_db.get_install_depend(self.__search_list, - self.__already_pk_value) -+ pk_value=self.__already_pk_value) - ) - +- ) +- ++ res_list, not_found_components, pk_val = self.__search_db.get_install_depend(self.__search_list, ++ pk_value=self.__already_pk_value) ++ result_list = set(res_list) self.not_found_components.update(not_found_components) -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 11:00:55.158112200 +0800 -+++ pkgship/packageship/application/apps/package/function/searchdb.py 2020-09-25 10:59:35.232576400 +0800 +- self.__already_pk_value += pk_val ++ self.__already_pk_value = pk_val + for search in self.__search_list: + if search not in self.binary_dict.dictionary: + self.binary_dict.init_key(key=search, parent_node=[]) +diff -Naru pkgship-1.1.0/packageship/application/apps/package/function/searchdb.py pkg/packageship/application/apps/package/function/searchdb.py +--- pkgship-1.1.0/packageship/application/apps/package/function/searchdb.py 2020-10-13 13:57:13.529049796 +0800 ++++ pkg/packageship/application/apps/package/function/searchdb.py 2020-10-13 13:58:37.680278477 +0800 @@ -94,7 +94,7 @@ for db_name, data_base in self.db_object_dict.items(): @@ -173,3 +197,15 @@ diff -Naru pkgship-1.1.0/packageship/application/apps/package/function/searchdb. sql_com = text(""" SELECT DISTINCT bin_requires.NAME AS req_name, +diff -Naru pkgship-1.1.0/packageship/application/apps/package/function/self_depend.py pkg/packageship/application/apps/package/function/self_depend.py +--- pkgship-1.1.0/packageship/application/apps/package/function/self_depend.py 2020-10-13 13:57:13.529049796 +0800 ++++ pkg/packageship/application/apps/package/function/self_depend.py 2020-10-13 13:58:37.690278620 +0800 +@@ -143,7 +143,7 @@ + self.result_tmp.clear() + _, self.result_tmp, not_fd_com = \ + install_depend(self.db_list).query_install_depend(self.search_install_list, +- self.binary_dict.dictionary) ++ history_dicts=self.binary_dict.dictionary) + self.not_found_components.update(not_fd_com) + self.search_install_list.clear() + for key, values in self.result_tmp.items(): diff --git a/pkgship.spec b/pkgship.spec index 63286a7..0abe1da 100644 --- a/pkgship.spec +++ b/pkgship.spec @@ -1,6 +1,6 @@ Name: pkgship Version: 1.1.0 -Release: 13 +Release: 14 Summary: Pkgship implements rpm package dependence ,maintainer, patch query and so no. License: Mulan 2.0 URL: https://gitee.com/openeuler/openEuler-Advisor @@ -29,10 +29,10 @@ Patch4: 0005-fix-the-error-when-source-package-has-no-sub-packages.patch Patch5: 0006-fix-memory_caused-service-crash-and-data-duplication-issue.patch # Fix the problem of function parameters -Patch6: 0007-fix-the-problem-of-function-parameters.patch +Patch6: 0007-correct-the-parameter-transfer-method-and-change-the-status-recording-method.patch # Fix the selfbuild error message -Patch7: 0008-fix-selfbuild-error-message.patch +Patch7: 0008-fix-selfbuild-error-message.patch # Optimize-log-records-when-obtaining-issue-content Patch8: 0009-optimize-log-records-when-obtaining-issue-content.patch @@ -84,6 +84,9 @@ rm -rf $log_path %attr(0755,root,root) %{_bindir}/pkgship %changelog +* Tue Oct 13 2020 ZhangTao 1.1.0-14 +- correct-the-parameter-transfer-method-and-change-the-status-recording-method. + * Fri Sep 25 2020 Cheng Shaowei 1.1.0-13 - Optimize-log-records-when-obtaining-issue-content