[packages/rpmlint] rpm5 fix

glen glen at pld-linux.org
Fri Oct 3 20:01:05 CEST 2014


commit f5b2d519c20db52e7dc598cbef84657f9ea2f984
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Fri Oct 3 20:56:50 2014 +0300

    rpm5 fix
    
    'list' object is not callable

 revert-9f71923e.patch | 33 +++++++++++++++++++++++++++++++++
 rpmlint.spec          |  2 ++
 2 files changed, 35 insertions(+)
---
diff --git a/rpmlint.spec b/rpmlint.spec
index 2a4a87c..24c7978 100644
--- a/rpmlint.spec
+++ b/rpmlint.spec
@@ -18,6 +18,7 @@ Patch2:		%{name}-licenses.patch
 Patch3:		postshell.patch
 Patch4:		rpm5.patch
 Patch5:		bash-completion.patch
+Patch6:		revert-9f71923e.patch
 URL:		http://sourceforge.net/projects/rpmlint/
 BuildRequires:	python >= 1:2.6
 BuildRequires:	python-modules
@@ -69,6 +70,7 @@ bash-completion for rpmlint.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 cp -p config config.example
 cp -p %{SOURCE3} config
diff --git a/revert-9f71923e.patch b/revert-9f71923e.patch
new file mode 100644
index 0000000..136f3c7
--- /dev/null
+++ b/revert-9f71923e.patch
@@ -0,0 +1,33 @@
+self.header.format("%{ARCH}") does not work in rpm5
+(partial) revert to self.header[rpm.RPMTAG_ARCH]
+
+======================================================================
+ERROR: testcheck (__main__.TestPamCheck)
+----------------------------------------------------------------------
+Traceback (most recent call last):
+  File "/home/users/glen/rpm/packages/BUILD.x86_64-linux/rpmlint-1.6/test//test.PamCheck.py", line 12, in setUp
+    self.pkg = Testing.getTestedPackage('binary/PamCheck')
+  File "/home/users/glen/rpm/packages/BUILD.x86_64-linux/rpmlint-1.6/tools/Testing.py", line 37, in getTestedPackage
+    return Pkg.Pkg(pkg_path, tempfile.gettempdir())
+  File "/home/users/glen/rpm/packages/BUILD.x86_64-linux/rpmlint-1.6/Pkg.py", line 492, in __init__
+    self.arch = self.header.format("%{ARCH}")
+TypeError: 'list' object is not callable
+
+commit 9f71923e9bfb82f52ab60ebb22a03e0c827ff1ad
+Author: Ville Skyttä <ville.skytta at iki.fi>
+Date:   Sat Feb 8 22:34:50 2014 +0200
+
+Python 3 compatibility tweaks
+
+--- a/Pkg.py
++++ b/Pkg.py
+@@ -448,8 +448,8 @@ class Pkg:
+             self.arch = 'nosrc'
+         elif self.isSource():
+             self.arch = 'src'
+         else:
+-            self.arch = self.header.format("%{ARCH}")
++            self.arch = self.header[rpm.RPMTAG_ARCH]
+ 
+     # Return true if the package is a source package
+     def isSource(self):
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpmlint.git/commitdiff/f5b2d519c20db52e7dc598cbef84657f9ea2f984



More information about the pld-cvs-commit mailing list