# Bcc: control tags 459333 + patch thanks On 08/01/05 17:00 +0100, Pierre Habouzit said ... > > On Sat, Jan 05, 2008 at 01:50:56PM +0000, Joerg Jaspert wrote: > > > > With the current title you request removal from unstable, please fix. > > Rrriiight, it'd be nice if reportbug could have the proper questions, > I never remember what the subject for RMs should be, and usually > maintainers don't ask for removals _that_ often, so it'd be best if > reportbug assumed we were stupid about that :) > > To the reporbug maintainer: it'd be great if when reporting a bug to > ftp.debian.org a `removal` bug suite of questions could happen that > would ask for the targetted suites (defaulting to unstable), the reason > (RoM, RoQA, RoRM, ..) and ask for the complementar informations > (obsolete, no upstream, whatever).
Attached patch attempts to reduce this pain. Comments are welcome. TV indicated that he would sponsor an NMU if (among other bugs) it has this bug fixed. Giridhar -- Y Giridhar Appaji Nag | http://www.appaji.net/
diff -Nur reportbug-3.39.orig/debianbts.py reportbug-3.39/debianbts.py --- reportbug-3.39.orig/debianbts.py 2007-04-20 02:03:09.000000000 +0530 +++ reportbug-3.39/debianbts.py 2008-03-19 01:11:14.000000000 +0530 @@ -155,7 +155,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 +182,115 @@ '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' + + 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) + + return (subject, severity, headers, pseudos, body, query) + def handle_wnpp(package, bts, ui, fromaddr, online=True, http_proxy=None): desc = body = '' headers = [] @@ -310,7 +419,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', diff -Nur reportbug-3.39.orig/reportbug reportbug-3.39/reportbug --- reportbug-3.39.orig/reportbug 2007-08-17 04:10:37.000000000 +0530 +++ reportbug-3.39/reportbug 2008-03-18 23:48:52.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):
signature.asc
Description: Digital signature