[Reportbug-maint] Bug#501285: Cannot provide extra information -- command instead quits querybts

Carl Chenet chaica at ohmytux.com
Tue Jul 28 22:32:18 UTC 2009


Package: reportbug
Version: 4.5
Severity: normal
Tags: patch

Hi Sandro,

What about offering the user to choose between exiting or querying the BTS one more time ?
Here is a new patch to do so.

Bye,
Carl Chenet


-- Package-specific info:
** Environment settings:
DEBEMAIL="chaica at 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.21     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
-------------- next part --------------
>From 21986b35287e1893e292cf2da18fd6088ae2588c Mon Sep 17 00:00:00 2001
From: chaica <chaica at ohmytux.com>
Date: Wed, 29 Jul 2009 00:25:53 +0200
Subject: [PATCH] warn users for options not available v2

---
 bin/querybts |   32 +++++++++++++++++++++++++-------
 1 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/bin/querybts b/bin/querybts
index f4c0b7a..8157ca8 100755
--- a/bin/querybts
+++ b/bin/querybts
@@ -221,13 +221,31 @@ def main():
             match = reportre.match(package)
             if match:
                 report = int(match.group(1))
-                return ui.show_report(report, system, mirrors,
-                                      http_proxy, queryonly=True,
-                                      title=VERSION,
-                                      archived=archived)
-        ui.handle_bts_query(package, system, mirrors, http_proxy,
-                            queryonly=True, title=VERSION, archived=archived,
-                            source=source, buglist=buglist)
+                while 1 :
+                    retvalue = ui.show_report(report, system, mirrors,
+                                          http_proxy, queryonly=True,
+                                          title=VERSION,
+                                          archived=archived)
+                    ui.long_message('This option is not available while using querybts alone.\n')
+                    x = ui.select_options('What do you want to do now?', 'Qb',
+                                          {'q': 'Exit querybts.',
+                                           'b': 'Query BTS one more time.'})
+                    if x == 'q':
+                        ui.long_message('Exiting.\n')
+                        sys.exit(0)
+
+        while 1:
+            ui.handle_bts_query(package, system, mirrors, http_proxy,
+                                queryonly=True, title=VERSION, archived=archived,
+                                source=source, buglist=buglist)
+            ui.long_message('This option is not available while using querybts alone.\n')
+            x = ui.select_options('What do you want to do now?', 'Qb',
+                                  {'q': 'Exit querybts.',
+                                   'b': 'Query BTS one more time.'})
+            if x == 'q':
+                ui.long_message('Exiting.\n')
+                sys.exit(0)
+
     except NoPackage:
         ui.long_message('Package appears not to exist in the BTS.\n')
     except NoBugs:
-- 
1.6.2.3



More information about the Reportbug-maint mailing list