[rpmlint/f19] fix unicode naming bug (bz 1036310)

Tom Callaway spot at fedoraproject.org
Thu Dec 12 18:28:19 UTC 2013


commit f397ab778862f9d66909c6af98b612442197413b
Author: Tom Callaway <spot at fedoraproject.org>
Date:   Thu Dec 12 13:28:25 2013 -0500

    fix unicode naming bug (bz 1036310)

 rpmlint-1.5-fix-unicode-name-bug.patch |   12 ++++++++++++
 rpmlint.spec                           |    8 +++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/rpmlint-1.5-fix-unicode-name-bug.patch b/rpmlint-1.5-fix-unicode-name-bug.patch
new file mode 100644
index 0000000..19d95a7
--- /dev/null
+++ b/rpmlint-1.5-fix-unicode-name-bug.patch
@@ -0,0 +1,12 @@
+--- a/TagsCheck.py
++++ b/TagsCheck.py
+@@ -464,6 +464,8 @@
+             # squeeze whitespace to ease leading context check
+             checker.set_text(re.sub(r'\s+', ' ', str))
+             uppername = pkg.name.upper()
++            if use_utf8:
++                uppername = Pkg.to_utf8(uppername).decode('utf-8')
+             upperparts = uppername.split('-')
+             if lang.startswith('en'):
+                 ups = [x + "'S" for x in upperparts]
+
diff --git a/rpmlint.spec b/rpmlint.spec
index ea2ca53..674ef03 100644
--- a/rpmlint.spec
+++ b/rpmlint.spec
@@ -1,6 +1,6 @@
 Name:           rpmlint
 Version:        1.5
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Tool for checking common errors in RPM packages
 
 Group:          Development/Tools
@@ -20,6 +20,8 @@ Patch0:		rpmlint-1.5-desktopfix.patch
 Patch1:		rpmlint-1.5-dont-modify-sys-argv-0.patch
 # http://sourceforge.net/p/rpmlint/code/ci/910b08d053eb384605ca6ad5606791e7c224c3fa
 Patch2:		rpmlint-1.5-fix-unbound-var.patch
+# https://sourceforge.net/p/rpmlint/code/ci/9844a91e281b2da647c599c3958ec34375d245a2
+Patch3:		rpmlint-1.5-fix-unicode-name-bug.patch
 
 BuildArch:      noarch
 BuildRequires:  python >= 2.4
@@ -58,6 +60,7 @@ and source packages as well as spec files can be checked.
 %patch0 -p1 -b .desktopfix
 %patch1 -p1 -b .argv0
 %patch2 -p1 -b .fixunbound
+%patch3 -p1 -b .fixunicode
 sed -i -e /MenuCheck/d Config.py
 cp -p config config.example
 install -pm 644 %{SOURCE2} CHANGES.package.old
@@ -108,6 +111,9 @@ make check
 
 
 %changelog
+* Thu Dec 12 2013 Tom Callaway <spot at fedoraproject.org> - 1.5-6
+- fix unicode naming bug (bz 1036310)
+
 * Mon Nov 11 2013 Tom Callaway <spot at fedoraproject.org> - 1.5-5
 - do not modify sys.argv[0] (bz 1026333)
 - fix unbound var in MenuXDGCheck.py (bz 1026328)


More information about the scm-commits mailing list