fix bedepend data error patch

This commit is contained in:
ztzt 2021-04-08 20:45:41 +08:00
parent 103d609eb8
commit 5514683a74
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,29 @@
diff --git a/packageship/application/core/depend/be_depend.py b/packageship/application/core/depend/be_depend.py
index 04f5b02..06dbd44 100644
--- a/packageship/application/core/depend/be_depend.py
+++ b/packageship/application/core/depend/be_depend.py
@@ -45,6 +45,7 @@ class BeDepend(BaseDepend):
searched_pkg.add(pkg_info.get("src_name"))
binary_pkgs.update(set(pkg_info.get("subpacks", [])))
+ self._search_set.update(searched_pkg)
if is_init:
not_found_pkg = str(set(pkg_name_lst) - searched_pkg)
self.log_msg = f"source packages {not_found_pkg} not found in {self.database}"
@@ -158,6 +159,8 @@ class BeDepend(BaseDepend):
"""
next_search_pkgs = set()
src_key = req_src_info["req_src_name"]
+ if src_key not in self._search_set:
+ next_search_pkgs.update(self.__get_subpacks([src_key]))
if src_key not in self.source_dict:
self.source_dict[src_key] = {
"name": src_key,
@@ -165,7 +168,6 @@ class BeDepend(BaseDepend):
"database": self.database,
"build": [dep_name],
}
- next_search_pkgs.update(self.__get_subpacks([src_key]))
else:
if dep_name not in self.source_dict[src_key]["build"]:
self.source_dict[src_key]["build"].append(dep_name)

View File

@ -1,6 +1,6 @@
Name: pkgship
Version: 2.1.0
Release: 8
Release: 9
Summary: Pkgship implements rpm package dependence ,maintainer, patch query and so on.
License: Mulan 2.0
URL: https://gitee.com/openeuler/pkgship
@ -15,6 +15,7 @@ patch0006: 0006-add-check-service-status-when-init.patch
patch0007: 0007-update-readme.patch
patch0008: 0008-update-patch-import.patch
patch0009: 0009-add-es-insert-test-cases.patch
patch0010: 0010-fix-bedepend-data-error.patch
BuildArch: noarch
@ -119,6 +120,9 @@ create_dir_file /var/log/pkgship-operation 700 d
%attr(0640,pkgshipuser,pkgshipuser) /lib/systemd/system/pkgship.service
%changelog
* Thu Apr 08 2021 zhang tao <zhangtao307@huawei.com> - 2.1.0-9
- fix bedepend data error
* Sat Mar 20 2021 Haiwei Li <lihaiwei8@huawei.com> - 2.1.0-8
- add patchs from the previous version