diff --git a/0001-fix-short-variable-none.patch b/0001-fix-short-variable-none.patch new file mode 100644 index 0000000000000000000000000000000000000000..223eb0eb46ffe449651b887bc440a981d15cee12 --- /dev/null +++ b/0001-fix-short-variable-none.patch @@ -0,0 +1,25 @@ +From 9781853e80ff20dc5f5a01bb4c90aa490c7dfd34 Mon Sep 17 00:00:00 2001 +From: t_feng +Date: Thu, 27 Aug 2020 23:38:19 +0800 +Subject: [PATCH] fix short variable none + +--- + productmd/treeinfo.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/productmd/treeinfo.py b/productmd/treeinfo.py +index a8f472e..2404d26 100644 +--- a/productmd/treeinfo.py ++++ b/productmd/treeinfo.py +@@ -246,7 +246,7 @@ class Release(BaseProduct): + self.name = "CentOS" + self.short = "CentOS" + else: +- self.short = None ++ self.short = "" + + def deserialize_0_3(self, parser): + self.name = parser.get("product", "name") +-- +2.23.0 + diff --git a/productmd-add-support-generic-os.patch b/productmd-add-support-generic-os.patch deleted file mode 100644 index 4b1e6ab8bcc820046a8c8a64efa0cfe859b8e0a0..0000000000000000000000000000000000000000 --- a/productmd-add-support-generic-os.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -uNrp a/productmd/treeinfo.py b/productmd/treeinfo.py ---- a/productmd/treeinfo.py 2016-11-15 15:04:26.000000000 +0000 -+++ b/productmd/treeinfo.py 2019-01-10 16:44:48.998592066 +0000 -@@ -245,6 +245,9 @@ class Release(BaseProduct): - elif self.name.startswith("CentOS"): - self.name = "CentOS" - self.short = "CentOS" -+ elif self.name.startswith("generic_os"): -+ self.name = "generic_os" -+ self.short = "generic_os" - else: - self.short = None - diff --git a/python-productmd.spec b/python-productmd.spec index 6c929fdec90126b09921c24041f49846d5d0f262..d1c55bcc30e7009643c4a1b9c002c139cca30f89 100644 --- a/python-productmd.spec +++ b/python-productmd.spec @@ -1,12 +1,12 @@ Name: python-productmd Version: 1.26 -Release: 1 +Release: 2 Summary: Python library providing parsers for metadata License: LGPLv2+ URL: https://github.com/release-engineering/productmd Source0: https://files.pythonhosted.org/packages/source/p/productmd/productmd-%{version}.tar.bz2 -Patch9000: productmd-add-support-generic-os.patch +Patch9000: 0001-fix-short-variable-none.patch BuildArch: noarch @@ -36,8 +36,6 @@ Productmd for python3. %prep %autosetup -n productmd-%{version} -p1 -sed -i "s/generic_os/%{_vendor}/g" productmd/treeinfo.py - %build %py2_build %py3_build @@ -69,6 +67,12 @@ sed -i "s/generic_os/%{_vendor}/g" productmd/treeinfo.py %{python3_sitelib}/productmd-%{version}-py?.?.egg-info %changelog +* Sat` Mar 6 2021 yanan - 1.26-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix short variable none + * Sat Aug 22 2020 tianwei - 1.26-1 - Type:enhancement - ID:NA