[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.9-140-g5ccf988
Sandro Tosi
morph at debian.org
Thu Dec 2 00:08:46 UTC 2010
The following commit has been merged in the master branch:
commit 6a5c5f3b870127bedb4466f42f3d2267a0b39a6e
Author: Sandro Tosi <morph at debian.org>
Date: Thu Aug 12 23:44:45 2010 +0200
added support for ftp.debian.org override requests
added support for 'Section' information, reorganized ftp.d.o code to
support 'override' along with normal RM requests; thanks to Emilio Pozuelo
Monfort for the report; Closes: #568980
diff --git a/bin/reportbug b/bin/reportbug
index 308371b..f827334 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -1455,7 +1455,7 @@ class UI(object):
(pkgversion, pkgavail, depends, recommends, conffiles, maintainer,
installed, origin, vendor, reportinfo, priority, desc, src_name,
- fulldesc, state, suggests) = status
+ fulldesc, state, suggests, section) = status
buginfo = '/usr/share/bug/' + package
bugexec = submitas = submitto = presubj = None
diff --git a/debian/changelog b/debian/changelog
index 721cb5e..c4453a2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,11 @@ reportbug (4.99) UNRELEASED; urgency=low
- automatically convert a partial removal from testing in a partial removal
from unstable; thanks to Adam D. Barratt for support while developing the
patch and Russ Allbery for the report; Closes: #597359
+ * bin/reportbug, reportbug{debianbts.py, utils.py}
+ - added support for ftp.debian.org override requests; added support for
+ 'Section' information, reorganized ftp.d.o code to support 'override'
+ along with normal RM requests; thanks to Emilio Pozuelo Monfort for the
+ report; Closes: #568980
-- Sandro Tosi <morph at debian.org> Wed, 17 Nov 2010 23:25:52 +0100
diff --git a/reportbug/debianbts.py b/reportbug/debianbts.py
index e9bcf58..0ddd281 100644
--- a/reportbug/debianbts.py
+++ b/reportbug/debianbts.py
@@ -223,6 +223,8 @@ def handle_debian_ftp(package, bts, ui, fromaddr, timeout, online=True, http_pro
"Package removal - Architecture Not Allowed In Source.",
'ICE' :
"Package removal - Internal Compiler Error.",
+ 'override' :
+ "Change override request.",
'other' :
"Not a package removal request, report other problems.",
}, 'Choose the request type: ', empty_ok=True)
@@ -259,7 +261,58 @@ def handle_debian_ftp(package, bts, ui, fromaddr, timeout, online=True, http_pro
sys.exit(1)
else:
package = info[12] or package
+ # get package section and priority, for override
+ section, priority = info[16], info[10]
+
+ if tag == 'override':
+ # we handle here the override change request
+ new_section = ui.menu('Select the new section', {
+ 'admin': "", 'cli-mono': "", 'comm': "", 'database': "",
+ 'debian-installer': "", 'debug': "", 'devel': "", 'doc': "",
+ 'editors': "", 'electronics': "", 'embedded': "", 'fonts': "",
+ 'games': "", 'gnome': "", 'gnu-r': "", 'gnustep': "",
+ 'graphics': "", 'hamradio': "", 'haskell': "", 'httpd': "",
+ 'interpreters': "", 'java': "", 'kde': "", 'kernel': "",
+ 'libdevel': "", 'libs': "", 'lisp': "", 'localization': "",
+ 'mail': "", 'math': "", 'misc': "", 'net': "",
+ 'news': "", 'ocaml': "", 'oldlibs': "", 'otherosfs': "",
+ 'perl': "", 'php': "", 'python': "", 'ruby': "",
+ 'science': "", 'shells': "", 'sound': "", 'tex': "",
+ 'text': "", 'utils': "", 'vcs': "", 'video': "",
+ 'web': "", 'x11': "", 'xfce': "", 'zope': "",
+ }, 'Choose the section: ', default=section, empty_ok=True)
+ if not new_section:
+ new_section = section
+
+ new_priority = ui.menu('Select the new priority', {
+ 'required': "",
+ 'important': "",
+ 'standard': "",
+ 'optional': "",
+ 'extra': "",
+ }, 'Choose the priority: ', default=priority, empty_ok=True)
+ if not new_priority:
+ new_priority = priority
+
+ if new_section == section and new_priority == priority:
+ ui.long_message("You didn't change section nor priority, exiting...")
+ sys.exit(1)
+
+ arch_section = ui.menu('Is this request for an archive section other than "main"?', {
+ 'main' : "",
+ 'contrib' : "",
+ 'non-free' : "",
+ }, 'Choose the archive section: ', default='main', empty_ok=True)
+ if not arch_section:
+ arch_section = 'main'
+ if arch_section != 'main':
+ subject = "override: %s:%s/%s %s" % (package, arch_section, new_section, new_priority)
+ else:
+ subject = "override: %s:%s/%s" % (package, new_section, new_priority)
+ body = "(Describe here the reason for this change)"
+ else:
+ # we handle here the removal requests
suite = ui.menu('Is the removal to be done in a suite other than'
' "unstable"? Please press Enter for "unstable"', {
'oldstable' : "Old stable.",
@@ -292,29 +345,30 @@ def handle_debian_ftp(package, bts, ui, fromaddr, timeout, online=True, http_pro
ui.long_message('Partial removal requests must have a list of architectures.\n')
raise SystemExit
- if suite == 'testing' and archs:
- ui.long_message('Partial removal for testing; forcing suite to '
- '\'unstable\', since it\'s the proper way to do that.')
- suite = 'unstable'
- body = '(please explain the reason for the removal here)\n\n' +\
- 'Note: this was a request for a partial removal from testing, ' +\
- 'converted in one for unstable'
-
- 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)
+
+ if suite == 'testing' and archs:
+ ui.long_message('Partial removal for testing; forcing suite to '
+ '\'unstable\', since it\'s the proper way to do that.')
+ suite = 'unstable'
+ body = '(please explain the reason for the removal here)\n\n' +\
+ 'Note: this was a request for a partial removal from testing, ' +\
+ 'converted in one for unstable'
+
+ 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:
- subject = 'RM: %s -- %s; %s' % (package, tag, reason)
+ 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.long_message('Please use release.debian.org pseudo-package and '
- 'report a bug there.')
- sys.exit(1)
+ if suite == 'testing':
+ ui.long_message('Please use release.debian.org pseudo-package and '
+ 'report a bug there.')
+ sys.exit(1)
return (subject, severity, headers, pseudos, body, query)
diff --git a/reportbug/utils.py b/reportbug/utils.py
index b652f17..9d241c6 100644
--- a/reportbug/utils.py
+++ b/reportbug/utils.py
@@ -308,9 +308,10 @@ def get_package_status(package, avail=False):
descre = re.compile('Description: ')
fullre = re.compile(' ')
srcre = re.compile('Source: ')
+ sectionre = re.compile('Section: ')
pkgversion = pkgavail = maintainer = status = origin = None
- bugs = vendor = priority = desc = src_name = None
+ bugs = vendor = priority = desc = src_name = section = None
conffiles = []
fulldesc = []
depends = []
@@ -384,6 +385,8 @@ def get_package_status(package, avail=False):
elif srcre.match(line):
crud, src_name = line.split(": ", 1)
src_name = src_name.split()[0]
+ elif sectionre.match(line):
+ crud, section = line.split(": ", 1)
elif desc and line[0]==' ':
fulldesc.append(line)
@@ -408,7 +411,8 @@ def get_package_status(package, avail=False):
info = (pkgversion, pkgavail, tuple(depends), tuple(recommends),
tuple(conffiles),
maintainer, installed, origin, vendor, reportinfo, priority,
- desc, src_name, os.linesep.join(fulldesc), state, tuple(suggests))
+ desc, src_name, os.linesep.join(fulldesc), state, tuple(suggests),
+ section)
if not avail:
statuscache[package] = info
--
Reportbug - reports bugs in the Debian distribution
More information about the Reportbug-commits
mailing list