fix short variable none to support other os
Signed-off-by: yanan-rock <yanan@huawei.com> (cherry picked from commit 0e1e47757671f8826d01419840f042f3b9e60b57)
This commit is contained in:
parent
fba129e108
commit
baeaca685c
25
0001-fix-short-variable-none.patch
Normal file
25
0001-fix-short-variable-none.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 9781853e80ff20dc5f5a01bb4c90aa490c7dfd34 Mon Sep 17 00:00:00 2001
|
||||||
|
From: t_feng <fengtao40@huawei.com>
|
||||||
|
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
|
||||||
|
|
||||||
@ -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
|
|
||||||
|
|
||||||
@ -1,12 +1,12 @@
|
|||||||
Name: python-productmd
|
Name: python-productmd
|
||||||
Version: 1.26
|
Version: 1.26
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Python library providing parsers for metadata
|
Summary: Python library providing parsers for metadata
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://github.com/release-engineering/productmd
|
URL: https://github.com/release-engineering/productmd
|
||||||
Source0: https://files.pythonhosted.org/packages/source/p/productmd/productmd-%{version}.tar.bz2
|
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
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -36,8 +36,6 @@ Productmd for python3.
|
|||||||
%prep
|
%prep
|
||||||
%autosetup -n productmd-%{version} -p1
|
%autosetup -n productmd-%{version} -p1
|
||||||
|
|
||||||
sed -i "s/generic_os/%{_vendor}/g" productmd/treeinfo.py
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
%py2_build
|
||||||
%py3_build
|
%py3_build
|
||||||
@ -69,6 +67,12 @@ sed -i "s/generic_os/%{_vendor}/g" productmd/treeinfo.py
|
|||||||
%{python3_sitelib}/productmd-%{version}-py?.?.egg-info
|
%{python3_sitelib}/productmd-%{version}-py?.?.egg-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat` Mar 6 2021 yanan <yanan@huawei.com> - 1.26-2
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:fix short variable none
|
||||||
|
|
||||||
* Sat Aug 22 2020 tianwei <tianwei12@huawei.com> - 1.26-1
|
* Sat Aug 22 2020 tianwei <tianwei12@huawei.com> - 1.26-1
|
||||||
- Type:enhancement
|
- Type:enhancement
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user