Package: reportbug
Version: 3.45
Severity: normal
Tags: patch
I was trying to hack gnome-reportbug but the module couldn't be imported.
The problem is that both AVAILABLE_UIS array and imp.find_module
usage is broken.
I've attached a simple patch.
-- Package-specific info:
** Environment settings:
EDITOR="jmacs"
VISUAL="jmacs"
EMAIL="[EMAIL PROTECTED]"
NAME="Luca Bruno"
INTERFACE="urwid"
** /home/lethal/.reportbugrc:
reportbug_version "3.42"
mode standard
ui gnome2
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-1-amd64 (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.14+b1 Advanced front-end for dpkg
ii python 2.5.2-2 An interactive high-level object-o
ii python-central 0.6.8 register and build utility for Pyt
reportbug recommends no packages.
Versions of packages reportbug suggests:
ii debconf-utils 1.5.22 debconf utilities
pn debsums <none> (no description available)
pn dlocate <none> (no description available)
ii esmtp-run [mail-transport-age 0.6.0-1 User configurable relay-only MTA
ii file 4.25-1 Determines file type using "magic"
ii gnupg 1.4.9-3 GNU privacy guard - a free PGP rep
ii python-urwid 0.9.8.3-1 curses-based UI/widget library for
-- debconf-show failed
--- usr/bin/reportbug.orig 2008-08-29 11:44:14.000000000 +0200
+++ usr/bin/reportbug 2008-08-29 11:35:40.000000000 +0200
@@ -821,7 +821,7 @@
sys.argv = sys.argv[:1] + list(args)
if options.interface:
interface = options.interface
- if interface in ('gnome', 'newt',):
+ if interface in ('gnome2', 'newt',):
ui.long_message("The %s interface is not supported. Unless you "
"are debugging reportbug, please do not use it. "
"If you are debugging reportbug, please DO NOT "
--- usr/share/reportbug/reportbuglib/reportbug.py.orig 2008-08-29 11:35:12.000000000 +0200
+++ usr/share/reportbug/reportbuglib/reportbug.py 2008-08-29 11:45:21.000000000 +0200
@@ -39,6 +39,7 @@
import socket
import subprocess
import imp
+from copy import copy
import debianbts
@@ -52,11 +53,11 @@
'Justification', 'Followup-For', 'Owner', 'User', 'Usertags')
VALID_UIS = ['newt', 'text', 'gnome2', 'urwid']
-AVAILABLE_UIS = VALID_UIS
+AVAILABLE_UIS = copy (VALID_UIS)
for ui in VALID_UIS:
module_name = 'reportbug_ui_%(ui)s' % vars()
try:
- imp.find_module(module_name)
+ imp.find_module(module_name, os.path.dirname (__file__))
except ImportError:
AVAILABLE_UIS.remove(ui)