Package: reportbug-ng
Version: 0.2007.10.30.1

Hi Bastian,

   I've attached an updated patch. Julien let me know that the bug scripts
can be interactive, so I've updated the patch to handle this by popping up
an xterm to run the script if xterm is available. It could easily be
extended to allow for other terminal emulators if it turns out to be
necessary, but most everyone who has reportbug-ng installed should have
xterm installed.

   The patch also includes a changelog entry. Since I know you're busy and
this bug is pretty important for several teams including mine I'm going to
upload an NMU with this patch to the delayed queue next weekend if I don't
hear back from you by then. Please let me know if there's anything else I
can do. 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


diff -ur 2007.10.30/reportbug-ng-0.2007.10.30/debian/changelog 2007.10.30.1/reportbug-ng-0.2007.10.30.1/debian/changelog
--- 2007.10.30/reportbug-ng-0.2007.10.30/debian/changelog	2007-10-30 15:15:16.000000000 -0400
+++ 2007.10.30.1/reportbug-ng-0.2007.10.30.1/debian/changelog	2007-12-16 11:05:51.000000000 -0500
@@ -1,3 +1,11 @@
+reportbug-ng (0.2007.10.30.1) UNRElEASED; urgency=low
+
+  * Support package bug scripts. This makes reportbug-ng suitable for
+    reporting bugs against several large package sets, such as the Xorg, KDE,
+    and Debian Installer packages. Closes: #422085
+
+ -- David Nusinow <[EMAIL PROTECTED]>  Sun, 16 Dec 2007 11:04:45 -0500
+
 reportbug-ng (0.2007.10.30) unstable; urgency=low
 
   * Translation updates:
diff -ur 2007.10.30/reportbug-ng-0.2007.10.30/src/lib/ReportbugNG.py 2007.10.30.1/reportbug-ng-0.2007.10.30.1/src/lib/ReportbugNG.py
--- 2007.10.30/reportbug-ng-0.2007.10.30/src/lib/ReportbugNG.py	2007-10-30 15:15:16.000000000 -0400
+++ 2007.10.30.1/reportbug-ng-0.2007.10.30.1/src/lib/ReportbugNG.py	2007-12-16 11:13:39.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,23 @@
 
     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"
+    xterm_path = "/usr/bin/xterm"
+    # pop up a terminal if we can because scripts can be interactive
+    if os.path.exists(xterm_path):
+        cmd = xterm_path + " -e "
+    else:
+        cmd = ""
+    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 +352,4 @@
     status, output = commands.getstatusoutput(command)
     logger.debug("After the  MUA call")
 
-    
\ No newline at end of file
+    

Reply via email to