From 5cb886f93e1940a07045674348f568e40a343a36 Mon Sep 17 00:00:00 2001 From: jiang Date: Wed, 1 Sep 2021 14:03:51 +0800 Subject: [PATCH] =?UTF-8?q?=20=E4=BF=AE=E8=A1=A5=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=8D=95=E5=8C=85=E4=BF=A1=E6=81=AF=E6=97=B6=E4=BC=9A=E6=9C=89?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=8A=A5=E9=94=99=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 930532f44a30f01017355dbbce6bc8b7a4f56755) --- 0001-bugfix-pkginfo.patch | 21 +++++++++++++++++++++ pkgship.spec | 8 +++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100755 0001-bugfix-pkginfo.patch mode change 100644 => 100755 pkgship.spec 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