Package: reportbug Version: 4.5 Severity: normal Tags: patch This is a patch to solve an issue when a MUA has a launching command different than its name (e.g gnus->emacs).
Bye, Carl Chenet -- Package-specific info: ** Environment settings: DEBEMAIL="cha...@ohmytux.com" DEBFULLNAME="Carl Chenet" INTERFACE="text" ** /home/chaica/.reportbugrc: reportbug_version "4.5" mode novice ui text smtphost "smtp.free.fr" -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages reportbug depends on: ii apt 0.7.20.2 Advanced front-end for dpkg ii python 2.5.4-2 An interactive high-level object-o ii python-reportbug 4.5 Python modules for interacting wit reportbug recommends no packages. Versions of packages reportbug suggests: pn debconf-utils <none> (no description available) ii debsums 2.0.44 verification of installed package pn dlocate <none> (no description available) ii exim4 4.69-9 metapackage to ease Exim MTA (v4) ii exim4-daemon-light [mail-tran 4.69-9 lightweight Exim MTA (v4) daemon ii file 5.00-1 Determines file type using "magic" ii gnupg 1.4.9-4 GNU privacy guard - a free PGP rep pn python-gnome2-extras <none> (no description available) pn python-gtk2 <none> (no description available) pn python-urwid <none> (no description available) pn python-vte <none> (no description available) -- no debconf information
>From 13144b52f9d28e29f4b98d2ab4f4d07df5d0b18a Mon Sep 17 00:00:00 2001 From: Carl Chenet <carl.che...@ohmytux.com> Date: Wed, 3 Jun 2009 19:13:11 +0200 Subject: [PATCH] * reportbug/utils.py - provide good checks for MUA having a different command than its name (gnus->emacs) --- reportbug/utils.py | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/reportbug/utils.py b/reportbug/utils.py index d663e7e..fac6e8b 100644 --- a/reportbug/utils.py +++ b/reportbug/utils.py @@ -767,14 +767,29 @@ MUAVERSION = { def mua_is_supported(mua): # check if the mua is supported by reportbug - if mua.split()[0] not in MUA: + if mua == 'mh' or mua == MUA['mh']: + mua = 'mh' + elif mua == 'nmh' or mua == MUA['nmh']: + mua = 'mh' + elif mua == 'gnus' or mua == MUA['gnus']: + mua = 'gnus' + else: + mua = mua.split()[0] + if mua not in MUA: return False else: return True def mua_exists(mua): # check if the mua is available on the system - mua = MUA[mua.split()[0]] + if mua == 'mh' or mua == MUA['mh']: + mua = MUA['mh'] + elif mua == 'nmh' or mua == MUA['nmh']: + mua = MUA['mh'] + elif mua == 'gnus' or mua == MUA['gnus']: + mua = MUA['gnus'] + else: + mua = MUA[mua.split()[0]] output = '/dev/null' if os.path.exists(output): try: -- 1.5.4.3