[gnome-abrt] Fix i18n crash, missing app crash

Jakub Filak jfilak at fedoraproject.org
Mon Mar 23 20:23:00 UTC 2015


commit ccd91ec684febfb7b2a008b0805dde2dd2bca4da
Author: Jakub Filak <jfilak at redhat.com>
Date:   Mon Mar 23 19:23:56 2015 +0100

    Fix i18n crash, missing app crash
    
    Resolves: #1204524

 ...-when-selected-problem-doesn-t-have-envir.patch | 29 ++++++++++++++++++++
 ...xt-function-returning-strings-instead-of-.patch | 31 ++++++++++++++++++++++
 gnome-abrt.spec                                    | 13 +++++++--
 3 files changed, 71 insertions(+), 2 deletions(-)
---
diff --git a/0008-Fix-a-crash-when-selected-problem-doesn-t-have-envir.patch b/0008-Fix-a-crash-when-selected-problem-doesn-t-have-envir.patch
new file mode 100644
index 0000000..b19433b
--- /dev/null
+++ b/0008-Fix-a-crash-when-selected-problem-doesn-t-have-envir.patch
@@ -0,0 +1,29 @@
+From 6b2ca4019c0c43e4e9ea6a5f59871b8286dc9818 Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at redhat.com>
+Date: Mon, 23 Mar 2015 18:15:24 +0100
+Subject: [PATCH] Fix a crash when selected problem doesn't have environ
+
+Kerneloopses are an example of such a kind of problem.
+
+Resolves: rhbz#1204524, rhbz#1204408
+
+Signed-off-by: Jakub Filak <jfilak at redhat.com>
+---
+ src/gnome_abrt/application.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/gnome_abrt/application.py b/src/gnome_abrt/application.py
+index 2d86e80..5d00056 100644
+--- a/src/gnome_abrt/application.py
++++ b/src/gnome_abrt/application.py
+@@ -34,6 +34,7 @@ class Application(object):
+ 
+ 
+ def find_application(cmdline, envp, pid):
++    app = None
+     if envp:
+         app = wrappers.get_app_for_env(envp.split('\n'), int(pid))
+     if not app:
+-- 
+2.3.2
+
diff --git a/0009-Use-a-gettext-function-returning-strings-instead-of-.patch b/0009-Use-a-gettext-function-returning-strings-instead-of-.patch
new file mode 100644
index 0000000..20ec6ae
--- /dev/null
+++ b/0009-Use-a-gettext-function-returning-strings-instead-of-.patch
@@ -0,0 +1,31 @@
+From 69d514370955e5c9d8173d6bf964debd76bf7236 Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at redhat.com>
+Date: Mon, 23 Mar 2015 19:13:50 +0100
+Subject: [PATCH] Use a gettext function returning strings instead of bytes
+
+lgettext returns an array of bytes in system encoding and this, together
+with Python3, causes troubles.
+
+Resolves: rhbz#1204339
+
+Signed-off-by: Jakub Filak <jfilak at redhat.com>
+---
+ src/gnome_abrt/l10n.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gnome_abrt/l10n.py b/src/gnome_abrt/l10n.py
+index 06c264b..332899c 100644
+--- a/src/gnome_abrt/l10n.py
++++ b/src/gnome_abrt/l10n.py
+@@ -22,7 +22,7 @@ import logging
+ 
+ GETTEXT_PROGNAME = None
+ 
+-_ = gettext.lgettext
++_ = gettext.gettext
+ 
+ def init(progname, localedir='/usr/share/locale'):
+     global GETTEXT_PROGNAME
+-- 
+2.3.2
+
diff --git a/gnome-abrt.spec b/gnome-abrt.spec
index a7feb9a..f86cfd3 100644
--- a/gnome-abrt.spec
+++ b/gnome-abrt.spec
@@ -6,7 +6,7 @@
 
 Name:       gnome-abrt
 Version:    1.1.0
-Release:    1%{?dist}
+Release:    2%{?dist}
 Summary:    A utility for viewing problems that have occurred with the system
 
 Group:      User Interface/Desktops
@@ -14,6 +14,8 @@ License:    GPLv2+
 URL:        https://fedorahosted.org/abrt/
 Source0:    https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz
 
+# git format-patch %%{Version} --topo-order -N -M;
+# i=1; for p in `ls 0*.patch`; do printf "Patch%04d: %s\n" $i $p; ((i++)); done
 Patch0001:  0001-build-Filter-out-unimportant-commit-messages-in-the-.patch
 Patch0002:  0002-Remove-unused-code-from-get_application.patch
 Patch0003:  0003-Add-wrapper-for-problem_create_app_from_env.patch
@@ -21,9 +23,11 @@ Patch0004:  0004-Try-to-use-environment-to-find-the-the-application.patch
 Patch0005:  0005-Fix-too-long-line.patch
 #Patch0006:  0006-Bump-the-required-versions-in-the-spec-file.patch
 #Patch0007:  0007-Fix-build-dependencies-caused-by-Python3.patch
+Patch0008:  0008-Fix-a-crash-when-selected-problem-doesn-t-have-envir.patch
+Patch0009:  0009-Use-a-gettext-function-returning-strings-instead-of-.patch
 
 # without this patch, make check fails in koji
-Patch0008:  0008-Turn-of-missing-member-pylint-warning-for-report-mod.patch
+Patch1000:  0008-Turn-of-missing-member-pylint-warning-for-report-mod.patch
 
 # git is need for '%%autosetup -S git' which automatically applies all the
 # patches above. Please, be aware that the patches must be generated
@@ -127,6 +131,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Tue Mar 17 2015 Jakub Filak <jfilak at redhat.com> - 1.1.0-2
+- Fix a crash caused by i18n
+- Fix a crash caused by problems without environment file
+- Resolves: #1204524
+
 * Tue Mar 17 2015 Jakub Filak <jfilak at redhat.com> - 1.1.0-1
 - Switch to Python3
 - Translation updates


More information about the scm-commits mailing list