[beakerlib/el5] release 1.9-5
Dalibor Pospisil
sopos at fedoraproject.org
Mon Oct 6 14:58:16 UTC 2014
commit cd25977fb8bff0c5a86cd5aaf258ec93f037c0e2
Author: Dalibor Pospisil <dapospis at redhat.com>
Date: Mon Oct 6 16:56:21 2014 +0200
release 1.9-5
...t-of-rpm.mi-objects-instead-of-relying-on.patch | 50 ++++++++++++++++++++
...ling-spaces-from-beakerlib_rpm-and-beaker.patch | 35 ++++++++++++++
beakerlib.spec | 10 ++++-
3 files changed, 94 insertions(+), 1 deletions(-)
---
diff --git a/0001-check-.count-of-rpm.mi-objects-instead-of-relying-on.patch b/0001-check-.count-of-rpm.mi-objects-instead-of-relying-on.patch
new file mode 100644
index 0000000..923ed1c
--- /dev/null
+++ b/0001-check-.count-of-rpm.mi-objects-instead-of-relying-on.patch
@@ -0,0 +1,50 @@
+From d6b190a12ef81058411033f8683fd7e35a13745e Mon Sep 17 00:00:00 2001
+From: Dan Callaghan <dcallagh at redhat.com>
+Date: Fri, 19 Sep 2014 16:33:09 +1000
+Subject: [PATCH 1/2] check .count() of rpm.mi objects instead of relying on
+ bool coercion
+
+Older versions of RPM (including the version in RHEL5 and earlier) did
+not implement bool coercion for rpm.mi objects, they are always true
+even if they contain no matches. len() is also not implemented. So we
+need to check .count() before we can assume there are any matches.
+
+Bug: 1142535
+---
+ src/python/journalling.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/python/journalling.py b/src/python/journalling.py
+index b7ede6d..e404742 100755
+--- a/src/python/journalling.py
++++ b/src/python/journalling.py
+@@ -296,7 +296,7 @@ class Journal(object):
+ return None
+
+ testInfo = ts.dbMatch("name", package)
+- if not testInfo:
++ if not testInfo.count():
+ return None
+
+ buildtime = time.gmtime(int(testInfo.next().format("%{BUILDTIME}")))
+@@ -384,7 +384,7 @@ class Journal(object):
+ ts = rpm.ts()
+ mi = ts.dbMatch("name", "beakerlib")
+ beakerlibRpmEl = newdoc.createElement("beakerlib_rpm")
+- if mi:
++ if mi.count():
+ beakerlib_rpm = mi.next()
+ beakerlibRpmCon = newdoc.createTextNode("%(name)s-%(version)s-%(release)s " % beakerlib_rpm)
+ else:
+@@ -392,7 +392,7 @@ class Journal(object):
+
+ mi = ts.dbMatch("name", "beakerlib-redhat")
+ beakerlibRedhatRpmEl = newdoc.createElement("beakerlib_redhat_rpm")
+- if mi:
++ if mi.count():
+ beakerlib_redhat_rpm = mi.next()
+ beakerlibRedhatRpmCon = newdoc.createTextNode("%(name)s-%(version)s-%(release)s " % beakerlib_redhat_rpm)
+ else:
+--
+1.9.3
+
diff --git a/0002-remove-trailing-spaces-from-beakerlib_rpm-and-beaker.patch b/0002-remove-trailing-spaces-from-beakerlib_rpm-and-beaker.patch
new file mode 100644
index 0000000..6aeb4be
--- /dev/null
+++ b/0002-remove-trailing-spaces-from-beakerlib_rpm-and-beaker.patch
@@ -0,0 +1,35 @@
+From 3981ef7cafb1ffa82e9b348ba01a216080b1bcec Mon Sep 17 00:00:00 2001
+From: Dalibor Pospisil <dapospis at redhat.com>
+Date: Mon, 6 Oct 2014 16:47:23 +0200
+Subject: [PATCH 2/2] remove trailing spaces from beakerlib_rpm and
+ beakerlib_redhat_rpm elements
+
+---
+ src/python/journalling.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/python/journalling.py b/src/python/journalling.py
+index e404742..fd9fb94 100755
+--- a/src/python/journalling.py
++++ b/src/python/journalling.py
+@@ -386,7 +386,7 @@ class Journal(object):
+ beakerlibRpmEl = newdoc.createElement("beakerlib_rpm")
+ if mi.count():
+ beakerlib_rpm = mi.next()
+- beakerlibRpmCon = newdoc.createTextNode("%(name)s-%(version)s-%(release)s " % beakerlib_rpm)
++ beakerlibRpmCon = newdoc.createTextNode("%(name)s-%(version)s-%(release)s" % beakerlib_rpm)
+ else:
+ beakerlibRpmCon = newdoc.createTextNode("not installed")
+
+@@ -394,7 +394,7 @@ class Journal(object):
+ beakerlibRedhatRpmEl = newdoc.createElement("beakerlib_redhat_rpm")
+ if mi.count():
+ beakerlib_redhat_rpm = mi.next()
+- beakerlibRedhatRpmCon = newdoc.createTextNode("%(name)s-%(version)s-%(release)s " % beakerlib_redhat_rpm)
++ beakerlibRedhatRpmCon = newdoc.createTextNode("%(name)s-%(version)s-%(release)s" % beakerlib_redhat_rpm)
+ else:
+ beakerlibRedhatRpmCon = newdoc.createTextNode("not installed")
+
+--
+1.9.3
+
diff --git a/beakerlib.spec b/beakerlib.spec
index a7ef0dc..01f6591 100644
--- a/beakerlib.spec
+++ b/beakerlib.spec
@@ -1,7 +1,7 @@
Name: beakerlib
Summary: A shell-level integration testing library
Version: 1.9
-Release: 4%{?dist}
+Release: 5%{?dist}
License: GPLv2
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-root
@@ -36,6 +36,8 @@ Patch16: 0012-rlCheckRequirements-completely-supress-output-of-rlC.patch
Patch17: 0013-add-srpm-info-to-journal-bz1071693.patch
Patch18: 0014-supress-storage-data-in-non-debug-mode.patch
Patch19: 0001-reverting-conditional-phases-support-except-for-comm.patch
+Patch20: 0001-check-.count-of-rpm.mi-objects-instead-of-relying-on.patch
+Patch21: 0002-remove-trailing-spaces-from-beakerlib_rpm-and-beaker.patch
%description
@@ -74,6 +76,8 @@ Files for syntax highlighting BeakerLib tests in VIM editor
%patch17 -p1
%patch18 -p1
%patch19 -p1
+%patch20 -p1
+%patch21 -p1
%build
make build
@@ -114,6 +118,10 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/vim/vimfiles/after/syntax/beakerlib.vim
%changelog
+* Tue Oct 6 2014 Dalibor Pospisil <dapospis at redhat.com> - 1.9-5
+- bz1142535: check count of rpm.mi objects instead of relying on bool coercion
+- remove trailing spaces from beakerlib_rpm and beakerlib_redhat_rpm elements
+
* Tue Jul 17 2014 Dalibor Pospisil <dapospis at redhat.com> - 1.9-4
- reverted conditional phases support
More information about the scm-commits
mailing list