diff --git a/0001-bugfix-pkginfo.patch b/0001-bugfix-pkginfo.patch new file mode 100755 index 0000000..a87b7ec --- /dev/null +++ b/0001-bugfix-pkginfo.patch @@ -0,0 +1,21 @@ +diff -Nur pkgship-2.2.0/packageship/application/core/pkginfo/pkg.py pkgship-2.2.0-new/packageship/application/core/pkginfo/pkg.py +--- pkgship-2.2.0/packageship/application/core/pkginfo/pkg.py 2021-08-14 22:23:58.000000000 +0800 ++++ pkgship-2.2.0-new/packageship/application/core/pkginfo/pkg.py 2021-08-25 15:34:41.691761866 +0800 +@@ -180,13 +180,15 @@ + install_require_info = component_info.get("install_require") + required_by_bin = [] + for req_info in install_require_info: +- required_by_bin.append(req_info.get("req_bin_name")) ++ if req_info.get("req_bin_name"): ++ required_by_bin.append(req_info.get("req_bin_name")) + + # getting required_by_src + build_require_info = component_info.get("build_require") + required_by_src = [] + for req_info in build_require_info: +- required_by_src.append(req_info.get("req_src_name")) ++ if req_info.get("req_src_name"): ++ required_by_src.append(req_info.get("req_src_name")) + + component_dict = {"component": component_info.get("component"), + "required_by_bin": required_by_bin, diff --git a/pkgship.spec b/pkgship.spec old mode 100644 new mode 100755 index d81fc6a..6b893f1 --- a/pkgship.spec +++ b/pkgship.spec @@ -1,10 +1,11 @@ Name: pkgship Version: 2.2.0 -Release: 1 +Release: 2 Summary: Pkgship implements rpm package dependence ,maintainer, patch query and so on. License: Mulan 2.0 URL: https://gitee.com/openeuler/pkgship Source0: https://gitee.com/openeuler/pkgship-%{version}.tar.gz +patch0001: 0001-bugfix-pkginfo.patch BuildArch: noarch @@ -110,6 +111,11 @@ create_dir_file /var/log/pkgship-operation 700 d %attr(0640,pkgshipuser,pkgshipuser) /lib/systemd/system/pkgship.service %changelog +* Wed Aug 25 2021 Pengju Jiang - 2.2.0-2 +- when the command line is parsing a single package of json data, there will be none in the +- required_by_bin and required_by_bin lists in the json data, resulting in parsing errors, +- increase the judgment condition to prevent the existence of none value + * Sun Aug 15 2021 Haiwei Li - 2.2.0-1 - pkgship Upgrade to 2.2.0 - Merge the patch before 2021/8/16 into the source code