Hello community,

here is the log from the commit of package rpmlint for openSUSE:Factory checked 
in at 2016-03-07 13:36:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rpmlint (Old)
 and      /work/SRC/openSUSE:Factory/.rpmlint.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rpmlint"

Changes:
--------
--- /work/SRC/openSUSE:Factory/rpmlint/rpmlint.changes  2016-02-16 
09:27:46.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.rpmlint.new/rpmlint.changes     2016-03-07 
13:36:48.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Feb 22 08:16:34 UTC 2016 - [email protected]
+
+- add 0001-Avoid-messing-with-the-error-encoding-Fixes-61.patch (bsc#967556)
+- fix requires
+
+-------------------------------------------------------------------

New:
----
  0001-Avoid-messing-with-the-error-encoding-Fixes-61.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rpmlint.spec ++++++
--- /var/tmp/diff_new_pack.0uFcjh/_old  2016-03-07 13:36:50.000000000 +0100
+++ /var/tmp/diff_new_pack.0uFcjh/_new  2016-03-07 13:36:50.000000000 +0100
@@ -47,6 +47,7 @@
 Requires:       file
 Requires:       findutils
 Requires:       python-magic
+Requires:       python-xml
 Requires:       rpm-python
 # Requirement for ErlangCheck.py (pull-request #2).
 Requires:       python-pybeam
@@ -110,6 +111,7 @@
 Patch51:        postin-speedup.diff
 # 
https://github.com/rpm-software-management/rpmlint/commit/37fe9d4f237c2cb29fcb3b60d1ece189e578eeaf.patch
 and followup regression fixes
 Patch52:        binaryinfo-speedup.diff
+Patch53:        0001-Avoid-messing-with-the-error-encoding-Fixes-61.patch
 # PATCHLIST END
 # BuildArch must at the end. is a bug: 
https://bugzilla.suse.com/show_bug.cgi?id=926766
 BuildArch:      noarch

++++++ 0001-Avoid-messing-with-the-error-encoding-Fixes-61.patch ++++++
>From 8169818dbad3f8f6fccbc7e3de99e86b37ad45f6 Mon Sep 17 00:00:00 2001
From: Dirk Mueller <[email protected]>
Date: Mon, 22 Feb 2016 09:12:39 +0100
Subject: [PATCH] Solve exceptions on printing str (Fixes #61)

Handle printing of str gracefully by first encoding
it to unicode before printing it in the proper encoding.
Also fix python2 check.
---
 Filter.py | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

Index: rpmlint-rpmlint-1.8/Filter.py
===================================================================
--- rpmlint-rpmlint-1.8.orig/Filter.py
+++ rpmlint-rpmlint-1.8/Filter.py
@@ -24,20 +24,20 @@ _diagnostic = list()
 _badness_score = 0
 printed_messages = {"I": 0, "W": 0, "E": 0}
 
-if sys.stdout.isatty():
-    def __print(s):
-        print(s)
-else:
-    __stdout = sys.stdout
-    if not __stdout.encoding:  # Python < 3 only?
-        import codecs
-        if hasattr(__stdout, "buffer"):
-            __stdout = __stdout.buffer
-        __stdout = codecs.getwriter(
-            locale.getpreferredencoding())(__stdout, "replace")
+__stdout = sys.stdout
+__preferred_encoding = locale.getpreferredencoding()
+if hasattr(__stdout, 'xreadlines'):   # Python < 3 only
+    import codecs
+    if hasattr(__stdout, "buffer"):
+        __stdout = __stdout.buffer
+    __stdout = codecs.getwriter(
+        __preferred_encoding)(sys.stdout, 'replace')
 
-    def __print(s):
-        print(s, file=__stdout)
+
+def __print(s):
+    if isinstance(s, str) and hasattr(s, 'decode'):
+        s = s.decode(__preferred_encoding, 'replace')
+    print(s, file=__stdout)
 
 
 def printInfo(pkg, reason, *details):

Reply via email to