[Reportbug-maint] Bug#537624: While providing extra info, reportbug should loop until a subject has been provided

Carl Chenet chaica at ohmytux.com
Sun Jul 19 21:58:21 UTC 2009


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

Hi,

While providing extra info, reportbug should loop until a subject has been provided. Here is a 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 47650e437237f449459c4b3e3309a67d4e146bbf Mon Sep 17 00:00:00 2001
From: chaica <chaica at ohmytux.com>
Date: Sun, 19 Jul 2009 23:57:16 +0200
Subject: [PATCH] force providing subject while entering extra info

---
 bin/reportbug |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/bin/reportbug b/bin/reportbug
index ff48d77..39e6f86 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -1587,9 +1587,15 @@ For more details, please see: http://www.debian.org/devel/wnpp/''')
             if special:
                 body = ''
             prompted = True
-            subject = ui.get_string(
-                'Please provide a subject for your response; no subject will '
-                'stop reportbug.', force_prompt=True)
+            subject_ok = False
+            while not subject_ok:
+                subject = ui.get_string(
+                    'Please provide a subject for your response.', force_prompt=True)
+                if not subject:
+                    ewrite("Providing a subject is mandatory.\n")
+                else:
+                    subject_ok = True
+
             # Check to make sure the bug still exists to avoid auto-reopens
             if subject and pkgversion:
                 if not ui.yes_no('Does this bug still exist in version %s '
-- 
1.6.2.3



More information about the Reportbug-maint mailing list