tags 422085 + patch
thanks

Package: reportbug-ng
Version: 0.2007.10.31

Patch attached for this issue. Since reportbug-ng is now being pimped on
planet Ubuntu I'd appreciate a quick upload with this patch before we get
flooded with bugs from novice users.. If not, I'd appreciate a go-ahead to
NMU it myself. Thanks!

 - David Nusinow

--- System information. ---
Architecture: i386
Kernel:       Linux 2.6.21-1-686

Debian Release: lenny/sid
  500 unstable        www.debian-multimedia.org 
  500 unstable        uqm.debian.net 
  500 unstable        ftp.us.debian.org 
  500 stable          apt.tt-solutions.com 
    1 experimental    ftp.debian.org 

--- Package information. ---
Depends             (Version) | Installed
=============================-+-===========
python                        | 2.4.4-6
python-central     (>= 0.5.8) | 0.5.15
python-qt3                    | 3.17.3-3
python-soappy                 | 0.12.0-2
xdg-utils                     | 1.0.1-2


Index: reportbug-ng-0.2007.10.30/src/lib/ReportbugNG.py
===================================================================
--- reportbug-ng-0.2007.10.30.orig/src/lib/ReportbugNG.py	2007-12-08 16:30:51.000000000 -0500
+++ reportbug-ng-0.2007.10.30/src/lib/ReportbugNG.py	2007-12-08 16:30:58.000000000 -0500
@@ -87,6 +87,7 @@
     s += getSystemInfo() + "\n"
     s += getDebianReleaseInfo() + "\n"
     s += getPackageInfo(package) + "\n"
+    s += getPackageScriptOutput(package) + "\n"
 
     return s
 
@@ -311,6 +312,17 @@
 
     return debinfo
 
+def getPackageScriptOutput(package):
+    """Runs the package's script in /usr/share/bug/packagename/script and
+       returns the output."""
+    output = ''
+    path = "/usr/share/bug/" + str(package) + "/script"
+    cmd = path + " 3>&1"
+    if os.path.exists(path):
+        output += "--- Output from package bug script ---\n"
+        output += commands.getoutput(cmd)
+    return output
+
 
 def callBrowser(url):
     """Calls an external Browser to upen the URL."""
@@ -334,4 +346,4 @@
     status, output = commands.getstatusoutput(command)
     logger.debug("After the  MUA call")
 
-    
\ No newline at end of file
+    

Reply via email to