Hi,

Attaching an NMU diff that fixes a bunch of bugs (please look at the
changelog entry in the diff for details).  There are a handful of other
bugs that can be fixed but I suppose they aren't really suitable for an
NMU and maybe an upload can be done later fixing those.

Cheers,

Giridhar

-- 
Y Giridhar Appaji Nag | http://www.appaji.net/
diff -Nur orig.reportbug-3.39/debian/changelog reportbug-3.39-0.1/debian/changelog
--- orig.reportbug-3.39/debian/changelog	2007-08-17 04:10:09.000000000 +0530
+++ reportbug-3.39-0.1/debian/changelog	2008-03-22 15:33:31.000000000 +0530
@@ -1,3 +1,19 @@
+reportbug (3.39-0.1) unstable; urgency=low
+
+  * Non-maintainer upload
+  * Add templates for ftp.debian.org removal (RM) requests (Closes: #459333)
+  * Add a -P option to allow setting pseudo-headers, useful for setting
+    usertags.  Thanks Lucas Nussbaum <[EMAIL PROTECTED]> for the patch
+    (Closes: #445144)
+  * Raise an error and indicate to the user in case of any network errors
+    (Closes: #302103)
+  * CC: [EMAIL PROTECTED] when a security issue is
+    reported (Closes: #448874)
+  * Indicate that in mode > standard incoming and NEW are also checked with
+    --check-available (Closes: #450523, #447380)
+
+ -- Y Giridhar Appaji Nag <[EMAIL PROTECTED]>  Sat, 22 Mar 2008 15:33:23 +0530
+
 reportbug (3.39) unstable; urgency=low
 
   * Add man page for reportbug.conf, thanks to Y Giridhar Appaji Nag.
diff -Nur orig.reportbug-3.39/debianbts.py reportbug-3.39-0.1/debianbts.py
--- orig.reportbug-3.39/debianbts.py	2007-04-20 02:03:09.000000000 +0530
+++ reportbug-3.39-0.1/debianbts.py	2008-03-22 09:17:39.000000000 +0530
@@ -25,6 +25,7 @@
 # $Id: debianbts.py,v 1.24.2.12 2007/04/19 20:33:09 lawrencc Exp $
 
 import sgmllib, glob, os, re, reportbug, rfc822, time, urllib, checkversions
+from reportbug_exceptions import *
 from urlutils import open_url
 import sys
 
@@ -155,7 +156,7 @@
     'cdrom' : 'Problems with installation from CD-ROMs',
 # dpkg-iwj -- The dpkg branch maintained by Ian Jackson
     'debian-policy' : 'Proposed changes in the Debian policy documentation',
-    'ftp.debian.org' : 'Problems with the FTP site',
+    'ftp.debian.org' : 'Problems with the FTP site and Package removal requests',
     'general' : 'General problems (e.g., that many manpages are mode 755)',
 #    'install' : 'Problems with the sarge installer.',
 #    'installation' : 'General installation problems not covered otherwise.',
@@ -182,6 +183,125 @@
     'debian-general' : 'Any non-package-specific bug',
     }
 
+def handle_debian_ftp(package, bts, ui, fromaddr, online=True, http_proxy=None):
+    body = reason = archs = ''
+    suite = 'unstable'
+    headers = []
+    pseudos = []
+    query = True
+    
+    tag = ui.menu('What sort of request is this?  (If none of these '
+                  'things mean anything to you, or you are trying to report '
+                  'a bug in an existing package, please press Enter to '
+                  'exit reportbug.)', {
+        'ROM' :
+        "Package removal - Request Of Maintainer.",
+        'RoQA' :
+        "Package removal - Requested by the QA team.",
+        'ROP' :
+        "Package removal - Request of Porter.",
+        'ROSRM' :
+        "Package removal - Request of Stable Release Manager.",
+        'NBS' :
+        "Package removal - Not Built [by] Source.",
+        'NPOASR' :
+        "Package removal - Never Part Of A Stable Release.",
+        'NVIU' :
+        "Package removal - Newer Version In Unstable.",
+        'ANAIS' :
+        "Package removal - Architecture Not Allowed In Source.",
+        'ICE' :
+        "Package removal - Internal Compiler Error.",
+        '[cruft-report]' :
+        "Package removal - detected by the cruft finder script.",
+        'other' :
+        "Not a package removal request, report other problems.",
+        }, 'Choose the request type: ', empty_ok=True)
+    if not tag:
+        ui.long_message('To report a bug in a package, use the name of the package, not ftp.debian.org.\n')
+        raise SystemExit
+
+    severity = 'normal'
+    if tag == 'other':
+        return
+    else:
+        prompt = 'Please enter the name of the package: '
+        package = ui.get_string(prompt)
+        if not package:
+            ui.ewrite('You seem to want to report a generic bug, not request a removal\n')
+            return
+
+        ui.ewrite('Checking status database...\n')
+        info = reportbug.get_package_status(package)
+        available = info[1]
+
+        query = False
+        if not available:
+            info = reportbug.get_source_package(package)
+            if info:
+                info = reportbug.get_package_status(info[0][0])
+
+        if not info:
+            cont = ui.select_options(
+                "This package doesn't appear to exist; continue?",
+                'yN', {'y': 'Ignore this problem and continue.',
+                       'n': 'Exit without filing a report.' })
+            if cont == 'n':
+                sys.exit(1)
+        else:
+            package = info[12] or package
+
+        suite = ui.menu('Is the removal to be done in a suite other than'
+                        ' "unstable"?  Please press Enter for "unstable"', {
+            'oldstable' : "Old stable.",
+            'oldstable-proposed-updates' : "Old stable proposed updates.",
+            'stable' : "Stable.",
+            'stable-proposed-updates' : "Stable proposed updates.",
+            'testing' : "Testing",
+	    'testing-proposed-updates' : "Testing proposed updates",
+            'experimental' : "Experimental.",
+        }, 'Choose the suite: ', empty_ok=True)
+        if not suite:
+            suite = 'unstable'
+
+        if suite not in ('testing', 'unstable', 'experimental'):
+            headers.append('X-Debbugs-CC: [EMAIL PROTECTED]')
+            ui.ewrite('Your report will be carbon-copied to debian-release.\n')
+
+        why = 'Please enter the reason for removal: '
+        reason = ui.get_string(why)
+        if not reason: return
+
+        partial = ui.select_options(
+            "Is this removal request for specific architectures?",
+            'yN', {'y': 'This is a partial (specific architectures) removal.',
+                   'n': 'This removal is for all architectures.' })
+        if partial == 'y':
+            prompt = 'Please enter the arch list separated by a space: '
+            archs = ui.get_string(prompt)
+            if not archs:
+                ui.long_message('Partial removal requests must have a list of architectures.\n')
+                raise SystemExit
+
+    if archs:
+        if suite != 'unstable':
+            subject = 'RM: %s/%s [%s] -- %s; %s' % (package, suite, archs, tag, reason)
+        else:
+            subject = 'RM: %s [%s] -- %s; %s' % (package, archs, tag, reason)
+    else:
+        if suite != 'unstable':
+            subject = 'RM: %s/%s -- %s; %s' % (package, suite, tag, reason)
+        else:
+            subject = 'RM: %s -- %s; %s' % (package, tag, reason)
+
+    if suite == 'testing':
+        ui.ewrite('Please use the following subject and send a mail to '
+                  '[EMAIL PROTECTED] to request removal.\n')
+        ui.ewrite(subject)
+        sys.exit(1)
+
+    return (subject, severity, headers, pseudos, body, query)
+
 def handle_wnpp(package, bts, ui, fromaddr, online=True, http_proxy=None):
     desc = body = ''
     headers = []
@@ -310,7 +430,9 @@
               'btsroot' : 'http://www.debian.org/Bugs/',
               'otherpkgs' : debother,
               'nonvirtual' : ['linux-image', 'kernel-image'],
-              'specials' : { 'wnpp': handle_wnpp },
+              'specials' :
+                { 'wnpp': handle_wnpp,
+                  'ftp.debian.org': handle_debian_ftp },
               # Dependency packages
               'deppkgs' : ('gcc', 'g++', 'cpp', 'gcj', 'gpc', 'gobjc',
                            'chill', 'gij', 'g77', 'python', 'python-base',
@@ -763,8 +885,12 @@
 
 def get_cgi_reports(package, system='debian', http_proxy='', archived=False,
                     source=False, version=None):
-    page = open_url(cgi_package_url(system, package, archived, source,
+    try:
+        page = open_url(cgi_package_url(system, package, archived, source,
                                     version=version), http_proxy)
+    except:
+        raise NoNetwork
+
     if not page:
         return (0, None, None)
 
@@ -810,12 +936,18 @@
                 http_proxy='', archived=False, source=False):
     if isinstance(package, basestring):
         if SYSTEMS[system].get('cgiroot'):
-            result = get_cgi_reports(package, system, http_proxy, archived,
+            try:
+                result = get_cgi_reports(package, system, http_proxy, archived,
                                      source, version=version)
+            except:
+                raise NoNetwork
             if result: return result
 
         url = package_url(system, package, mirrors, source)
-        page = open_url(url, http_proxy)
+        try:
+            page = open_url(url, http_proxy)
+        except:
+            raise NoNetwork
         if not page:
             return (0, None, None)
 
diff -Nur orig.reportbug-3.39/querybts reportbug-3.39-0.1/querybts
--- orig.reportbug-3.39/querybts	2006-08-26 07:37:09.000000000 +0530
+++ reportbug-3.39-0.1/querybts	2008-03-22 09:17:39.000000000 +0530
@@ -205,6 +205,8 @@
         ui.long_message('No bug reports found.\n')
     except NoReport:
         ui.long_message('Nothing new to report; exiting.\n')
+    except NoNetwork:
+        ui.long_message('Cannot connect to network.\n')
 
 if __name__ == '__main__':
     try:
diff -Nur orig.reportbug-3.39/reportbug reportbug-3.39-0.1/reportbug
--- orig.reportbug-3.39/reportbug	2007-08-17 04:10:37.000000000 +0530
+++ reportbug-3.39-0.1/reportbug	2008-03-22 15:29:35.000000000 +0530
@@ -344,6 +344,14 @@
                 False):
                 return get_package_name(bts, mode)
 
+        if package == 'ftp.debian.org':
+            if not ui.yes_no(
+                'Are you sure you want to file a bug on ftp.debian.org?',
+                'Yes, I am a developer or know what I\'m doing.',
+                'No, I am not a developer and I don\'t know what ftp.debian.org is.',
+                False):
+                return get_package_name(bts, mode)
+
     return package
 
 def special_prompts(package, bts, ui, fromaddr):
@@ -620,6 +628,8 @@
                       help="key ID to use for PGP/GnuPG signatures")
     parser.add_option('-H', '--header', action='append', dest='headers',
                       help='add a custom RFC822 header to your report')
+    parser.add_option('-P', '--pseudo-header', action='append', dest='pseudos',
+                      help='add a custom pseudo-header to your report')
     parser.add_option('--license', action='store_true', default=False,
                       help='show copyright and license information')
     parser.add_option('-m', '--maintonly', action='store_const',
@@ -823,6 +833,7 @@
         check_available = self.options.check_available
         dontquery = self.options.dontquery
         headers = self.options.headers or []
+        pseudos = self.options.pseudos or []
         mua = self.options.mua
         pkgversion = self.options.pkgversion
         quietly = self.options.quietly
@@ -1218,9 +1229,13 @@
                                            '(blank OK)', force_prompt=True)
         elif (check_available and not (self.options.kudos or notatty or self.options.offline)
               and state == 'installed' and bts == 'debian'):
-            ewrite('Checking for newer versions at packages.debian.org...\n')
             arch = reportbug.get_arch()
             check_more = (mode > MODE_STANDARD)
+            if check_more:
+                ewrite('Checking for newer versions at packages.debian.org,'+
+                  ' incoming.debian.org and http://ftp-master.debian.org/new.html\n')
+            else:
+                ewrite('Checking for newer versions at packages.debian.org...\n')
             (avail, toonew) = checkversions.check_available(
                 package, pkgversion, check_incoming=check_more,
                 check_newqueue=check_more,
@@ -1294,7 +1309,6 @@
             dontquery = True
 
         special = False
-        pseudos = []
         if not body and not subject and not notatty:
             res = special_prompts(package, bts, ui, fromaddr)
             if res:
@@ -1638,8 +1652,9 @@
                 incfiles = addinfo
 
         if bts == 'debian' and 'security' in taglist:
-            ewrite('Will send a CC of this report to the Debian Security Team.\n')
+            ewrite('Will send a CC of this report to the Debian Security and Testing Security Team.\n')
             listcc += ['Debian Security Team <[EMAIL PROTECTED]>']
+            listcc += ['Debian Testing Security Team <[EMAIL PROTECTED]>']
 
         if listcc:
             headers.append('X-Debbugs-CC: '+', '.join(listcc))
diff -Nur orig.reportbug-3.39/reportbug.1 reportbug-3.39-0.1/reportbug.1
--- orig.reportbug-3.39/reportbug.1	2007-08-17 03:49:19.000000000 +0530
+++ reportbug-3.39-0.1/reportbug.1	2008-03-22 15:30:04.000000000 +0530
@@ -97,7 +97,10 @@
 backup will be written as .reportbugrc~.
 .TP
 .B \-\-check\-available
-Check for newer releases of the package at packages.debian.org (default).
+Check for newer releases of the package at packages.debian.org
+(default).  In \fBadvanced\fP and \fBexpert\fP mode, check
+\fBincoming.debian.org\fP and
+\fBhttp://ftp-master.debian.org/new.html\fP.
 .TP
 .B \-\-no\-check\-available
 Do not check for newer releases of the package at packages.debian.org.
@@ -306,6 +309,14 @@
 HTTP URL, including (if necessary) a port number; for example,
 \fBhttp://192.168.1.1:3128/\fP.
 .TP
+.B \-P PSEUDO-HEADER, \-\-pseudo\-header=PSEUDO-HEADER
+Add a custom pseudo-header to your email; for example, to add the
+.I mytag
+usertag for the user
+.I [EMAIL PROTECTED]
+to the bug, you could use
+.I \-P 'User: [EMAIL PROTECTED]' \-P 'Usertags: mytag'
+.TP
 .B \-q, \-\-quiet
 Suppress diagnostic messages to standard error.
 .TP
diff -Nur orig.reportbug-3.39/reportbug.conf reportbug-3.39-0.1/reportbug.conf
--- orig.reportbug-3.39/reportbug.conf	2004-12-06 19:29:04.000000000 +0530
+++ reportbug-3.39-0.1/reportbug.conf	2008-03-22 09:43:26.000000000 +0530
@@ -32,6 +32,9 @@
 # Should I query the BTS?
 query-bts
 
+# Should I check for newer releases of the package
+# check-available
+
 # Should I CC the reporter?
 cc
 
diff -Nur orig.reportbug-3.39/reportbug.conf.5 reportbug-3.39-0.1/reportbug.conf.5
--- orig.reportbug-3.39/reportbug.conf.5	2007-08-17 04:11:06.000000000 +0530
+++ reportbug-3.39-0.1/reportbug.conf.5	2008-03-22 09:43:26.000000000 +0530
@@ -20,7 +20,7 @@
 .\" 
 .\" $Id: reportbug.conf.5,v 1.1.2.1 2007-08-16 22:41:06 lawrencc Exp $
 .\" 
-.TH REPORTBUG.CONF 5 "Aug 2007" "reportbug 3.38"
+.TH REPORTBUG.CONF 5 "Dec 2007" "reportbug 3.39"
 .SH NAME
 .B reportbug.conf
 - The configuration file for reportbug
@@ -68,6 +68,12 @@
 .B cc (\fIboolean\fP)
 Whether the reporter should be Cc:ed on the bug report
 .TP
+.B check-available (\fIboolean\fP)
+Whether \fBpackages.debian.org\fP should be queried for newer releases
+of the package.  In \fBadvanced\fP and \fBexpert\fP mode,
+\fBincoming.debian.org\fP and
+\fBhttp://ftp-master.debian.org/new.html\fP are also checked.
+.TP
 .B compress (\fIboolean\fP)
 Whether modified configuration files included in the bug report should
 be stripped down
@@ -247,4 +253,4 @@
 This manual page was written by Y Giridhar Appaji Nag
 <[EMAIL PROTECTED]> for the Debian project, but may be used by others.
 .PP
-Last modified: 2007-08-13 by Y Giridhar Appaji Nag
+Last modified: 2007-12-20 by Y Giridhar Appaji Nag
diff -Nur orig.reportbug-3.39/reportbug.py reportbug-3.39-0.1/reportbug.py
--- orig.reportbug-3.39/reportbug.py	2007-08-17 04:10:37.000000000 +0530
+++ reportbug-3.39-0.1/reportbug.py	2008-03-22 09:16:16.000000000 +0530
@@ -42,7 +42,7 @@
 
 # Headers other than these become email headers for debbugs servers
 PSEUDOHEADERS = ('Package', 'Version', 'Severity', 'File', 'Tags',
-                 'Justification', 'Followup-For', 'Owner')
+                 'Justification', 'Followup-For', 'Owner', 'User', 'Usertags')
 
 VALID_UIS = ['newt', 'text', 'gnome2', 'urwid']
 AVAILABLE_UIS = []
diff -Nur orig.reportbug-3.39/reportbug_ui_text.py reportbug-3.39-0.1/reportbug_ui_text.py
--- orig.reportbug-3.39/reportbug_ui_text.py	2007-04-11 09:23:50.000000000 +0530
+++ reportbug-3.39-0.1/reportbug_ui_text.py	2008-03-22 09:17:39.000000000 +0530
@@ -505,8 +505,9 @@
         return browse_bugs(hierarchy, count, bugs, bts, queryonly,
                            mirrors, http_proxy, screen, title)
 
-    except IOError:
-        res = select_options('Unable to connect to BTS; continue', 'yN',
+    except (IOError, NoNetwork):
+        ewrite('Unable to connect to %s BTS; ', debianbts.SYSTEMS[bts]['name'])
+        res = select_options('continue', 'yN',
                              {'y': 'Keep going.',
                               'n': 'Abort.'})
         if res == 'n':

Attachment: signature.asc
Description: Digital signature

Reply via email to