!24 Fix the problem of function parameters
From: @tom-tao Reviewed-by: @solarhu Signed-off-by: @solarhu
This commit is contained in:
commit
c6a9c05c53
175
0007-fix-the-problem-of-function-parameters.patch
Normal file
175
0007-fix-the-problem-of-function-parameters.patch
Normal file
@ -0,0 +1,175 @@
|
||||
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 @@
|
||||
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.not_found_components.update(not_fd_com_build)
|
||||
@@ -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)
|
||||
self.not_found_components.update(not_fd_com_install)
|
||||
if not res_dict:
|
||||
return code
|
||||
@@ -206,7 +206,7 @@
|
||||
not_fd_com,
|
||||
pk_v
|
||||
) = self.search_db.get_build_depend(pkg_name_li,
|
||||
- self.__already_pk_val)
|
||||
+ pk_value=self.__already_pk_val)
|
||||
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,
|
||||
- self.__already_pk_value)
|
||||
+ pk_value=self.__already_pk_value)
|
||||
)
|
||||
|
||||
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
|
||||
@@ -94,7 +94,7 @@
|
||||
|
||||
for db_name, data_base in self.db_object_dict.items():
|
||||
try:
|
||||
- req_set = self._get_requires(search_set, data_base, _tp='install')
|
||||
+ req_set = self._get_requires(search_set, data_base, search_type='install')
|
||||
|
||||
if not req_set:
|
||||
continue
|
||||
@@ -104,7 +104,7 @@
|
||||
pk_v,
|
||||
not_fd_com) = self._get_provides_req_info(req_set,
|
||||
data_base,
|
||||
- pk_val)
|
||||
+ pk_value=pk_val)
|
||||
pk_val += pk_v
|
||||
res_list, get_list = self._comb_install_list(depend_set,
|
||||
req_pk_dict,
|
||||
@@ -121,7 +121,7 @@
|
||||
if not search_set:
|
||||
result_list.extend(
|
||||
self._get_install_pro_in_other_database(provides_not_found,
|
||||
- db_name)
|
||||
+ database_name=db_name)
|
||||
)
|
||||
return result_list, set(provides_not_found.keys()), pk_val
|
||||
|
||||
@@ -215,13 +215,13 @@
|
||||
|
||||
return ret_list, get_list
|
||||
|
||||
- def _get_install_pro_in_other_database(self, not_found_binary, _db_name=None):
|
||||
+ def _get_install_pro_in_other_database(self, not_found_binary, database_name=None):
|
||||
"""
|
||||
Description: Binary package name data not found in
|
||||
the current database, go to other databases to try
|
||||
Args:
|
||||
not_found_binary: not_found_build These data cannot be found in the current database
|
||||
- _db_name:current database name
|
||||
+ database_name:current database name
|
||||
Returns:
|
||||
result_list :[return_tuple1,return_tuple2] package information
|
||||
Raises:
|
||||
@@ -242,7 +242,7 @@
|
||||
search_set = {k for k, _ in not_found_binary.items()}
|
||||
|
||||
for db_name, data_base in self.db_object_dict.items():
|
||||
- if db_name == _db_name:
|
||||
+ if db_name == database_name:
|
||||
continue
|
||||
|
||||
parm_tuple = namedtuple("in_tuple", 'req_name')
|
||||
@@ -362,7 +362,7 @@
|
||||
for db_name, data_base in self.db_object_dict.items():
|
||||
|
||||
try:
|
||||
- req_set = self._get_requires(s_name_set, data_base, _tp='build')
|
||||
+ req_set = self._get_requires(s_name_set, data_base, search_type='build')
|
||||
|
||||
if not req_set:
|
||||
continue
|
||||
@@ -384,7 +384,7 @@
|
||||
s_name_set.symmetric_difference_update(set(get_list))
|
||||
if not s_name_set:
|
||||
build_list.extend(
|
||||
- self._get_binary_in_other_database(provides_not_found, _db_name=db_name)
|
||||
+ self._get_binary_in_other_database(provides_not_found, database_name=db_name)
|
||||
)
|
||||
return ResponseCode.SUCCESS, build_list, set(provides_not_found.keys()), pk_val
|
||||
|
||||
@@ -483,13 +483,13 @@
|
||||
|
||||
return ret_list, get_list
|
||||
|
||||
- def _get_binary_in_other_database(self, not_found_binary, _db_name=None):
|
||||
+ def _get_binary_in_other_database(self, not_found_binary, database_name=None):
|
||||
"""
|
||||
Description: Binary package name data not found in
|
||||
the current database, go to other databases to try
|
||||
Args:
|
||||
not_found_binary: not_found_build These data cannot be found in the current database
|
||||
- _db_name:current database name
|
||||
+ database_name:current database name
|
||||
Returns:
|
||||
result_list :[return_tuple1,return_tuple2] package information
|
||||
Raises:
|
||||
@@ -513,7 +513,7 @@
|
||||
|
||||
for db_name, data_base in self.db_object_dict.items():
|
||||
|
||||
- if db_name == _db_name:
|
||||
+ if db_name == database_name:
|
||||
continue
|
||||
|
||||
in_tuple = namedtuple("in_tuple", 'req_name')
|
||||
@@ -600,20 +600,20 @@
|
||||
|
||||
# Common methods for install and build
|
||||
@staticmethod
|
||||
- def _get_requires(search_set, data_base, _tp=None):
|
||||
+ def _get_requires(search_set, data_base, search_type=None):
|
||||
"""
|
||||
Description: Query the dependent components of the current package
|
||||
Args:
|
||||
search_set: The package name to be queried
|
||||
data_base:current database object
|
||||
- _tp:type options build or install
|
||||
+ search_type: type options build or install
|
||||
Returns:
|
||||
req_set:List Package information and corresponding component information
|
||||
Raises:
|
||||
AttributeError: The object does not have this property
|
||||
SQLAlchemyError: sqlalchemy error
|
||||
"""
|
||||
- if _tp == 'build':
|
||||
+ if search_type == 'build':
|
||||
sql_com = text("""
|
||||
SELECT DISTINCT
|
||||
src_requires.NAME AS req_name,
|
||||
@@ -623,7 +623,7 @@
|
||||
( SELECT pkgKey, NAME, version, src_name FROM src_pack WHERE {} ) src
|
||||
LEFT JOIN src_requires ON src.pkgKey = src_requires.pkgKey;
|
||||
""".format(literal_column('name').in_(search_set)))
|
||||
- elif _tp == 'install':
|
||||
+ elif search_type == 'install':
|
||||
sql_com = text("""
|
||||
SELECT DISTINCT
|
||||
bin_requires.NAME AS req_name,
|
||||
@ -1,6 +1,6 @@
|
||||
Name: pkgship
|
||||
Version: 1.1.0
|
||||
Release: 10
|
||||
Release: 11
|
||||
Summary: Pkgship implements rpm package dependence ,maintainer, patch query and so no.
|
||||
License: Mulan 2.0
|
||||
URL: https://gitee.com/openeuler/openEuler-Advisor
|
||||
@ -27,6 +27,10 @@ Patch4: 0005-fix-the-error-when-source-package-has-no-sub-packages.patch
|
||||
# Solve the problem of data duplication, increase the maximum queue length judgment,
|
||||
# and avoid occupying too much memory
|
||||
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
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python3-flask-restful python3-flask python3 python3-pyyaml python3-sqlalchemy
|
||||
@ -75,6 +79,9 @@ rm -rf $log_path
|
||||
%attr(0755,root,root) %{_bindir}/pkgship
|
||||
|
||||
%changelog
|
||||
* Fri Sep 25 2020 Zhang Tao <zhangtao307@huawei.com> - 1.1.0-11
|
||||
- Fix the problem of function parameters
|
||||
|
||||
* Thu Sep 24 2020 Yiru Wang <wangyiru1@huawei.com> - 1.1.0-10
|
||||
- rm queue_maxsize param from package.ini and this parameter is not customizable
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user