[rpmlint] Patch to fix messages that contain unicode summaries

Toshio くらとみ toshio at fedoraproject.org
Mon Jan 23 18:22:37 UTC 2012


commit 66978dd958a569b362ba2109d1d6604049e36bfc
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date:   Mon Jan 23 10:22:26 2012 -0800

    Patch to fix messages that contain unicode summaries
    
       https://bugzilla.redhat.com/show_bug.cgi?id=783912

 rpmlint-1.4-encoding.patch |   14 ++++++++++++++
 rpmlint.spec               |    8 +++++++-
 2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/rpmlint-1.4-encoding.patch b/rpmlint-1.4-encoding.patch
new file mode 100644
index 0000000..b0e7dd9
--- /dev/null
+++ b/rpmlint-1.4-encoding.patch
@@ -0,0 +1,14 @@
+diff -up rpmlint-1.4/Filter.py.enc rpmlint-1.4/Filter.py
+--- rpmlint-1.4/Filter.py.enc	2012-01-23 09:56:03.861515705 -0800
++++ rpmlint-1.4/Filter.py	2012-01-23 09:58:36.783740193 -0800
+@@ -29,7 +29,9 @@ if sys.stdout.isatty():
+         print(s)
+ else:
+     def __print(s):
+-        print(s.encode(locale.getpreferredencoding(), "replace"))
++        if isinstance(s, unicode):
++            s = s.encode(locale.getpreferredencoding(), "replace") 
++        print(s)
+ 
+ def printInfo(pkg, reason, *details):
+     _print("I", pkg, reason, details)
diff --git a/rpmlint.spec b/rpmlint.spec
index 2256e1d..5172c58 100644
--- a/rpmlint.spec
+++ b/rpmlint.spec
@@ -1,6 +1,6 @@
 Name:           rpmlint
 Version:        1.4
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Tool for checking common errors in RPM packages
 
 Group:          Development/Tools
@@ -14,6 +14,7 @@ Source3:        %{name}-etc.config
 Source4:        %{name}.config.el4
 # EL-5 specific config
 Source5:        %{name}.config.el5
+Patch0: rpmlint-1.4-encoding.patch
 BuildArch:      noarch
 BuildRequires:  python >= 2.4
 BuildRequires:  rpm-python >= 4.4
@@ -42,6 +43,7 @@ and source packages as well as spec files can be checked.
 
 %prep
 %setup -q
+%patch0 -p1 -b .enc
 sed -i -e /MenuCheck/d Config.py
 cp -p config config.example
 install -pm 644 %{SOURCE2} CHANGES.package.old
@@ -86,6 +88,10 @@ make check
 
 
 %changelog
+* Mon Jan 23 2012 Toshio Kuratomi <toshio at fedoraproject.org> - 1.4-6
+-  Patch to fix messages that contain unicode summaries
+   https://bugzilla.redhat.com/show_bug.cgi?id=783912
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list