[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.9-70-g3dc496f
Sandro Tosi
morph at debian.org
Thu Mar 11 23:09:32 UTC 2010
The following commit has been merged in the master branch:
commit 3dc496ff450cceb319f447bde300e2e63e7fc7ce
Author: Sandro Tosi <morph at debian.org>
Date: Fri Mar 12 00:08:08 2010 +0100
reorganized how BTS tags are retrieved and used
- create a get_tags() method to return the tags depending on severity of bug
report (for example, 'security' is available only if severity is RC)
- remove TAGLIST and EXTRA_TAGS, no more used
- update the tags list, including all those supported by BTS, not restricted
to Release Team and meaningfull at report time; thanks to Ido Kanner and
to martin f krafft for the reports; Closes: #286745, #498919, #524511
diff --git a/bin/reportbug b/bin/reportbug
index e0ab11f..5da1911 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -316,12 +316,10 @@ def handle_editing(filename, dmessage, options, sendto, attachments, package,
elif x == 't':
newtaglist = []
skip_editing = True
- ntags = debianbts.TAGS
- tagorder = debianbts.TAGLIST
+ ntags = debianbts.get_tags(severity)
newtaglist = ui.select_multiple(
'Do any of the following apply to this report?', ntags,
- 'Please select tags: ', order=tagorder,
- extras=debianbts.EXTRA_TAGS)
+ 'Please select tags: ')
if newtaglist:
oldtags = ''
newtags = ''
@@ -846,7 +844,7 @@ def main():
parser.add_option('-T', '--tag', action='callback', dest='tags',
callback=verify_append_option, type='string',
callback_args=('Permitted tags:',
- debianbts.TAGLIST+['none']),
+ sorted(debianbts.get_tags().keys())+['none']),
help='add the specified tag to the report')
parser.add_option('--http_proxy', '--proxy', help='use this proxy for '
'HTTP accesses')
@@ -1866,19 +1864,11 @@ For more details, please see: http://www.debian.org/devel/wnpp/''')
not (notatty or self.options.kudos or exinfo) and
package not in ('wnpp', 'ftp.debian.org', 'release.debian.org') and
mode > MODE_NOVICE):
- # Multiple-choice checkbox
- if severity in ('grave', 'critical', 'serious'):
- tags = debianbts.TAGS.copy()
- tags.update(debianbts.CRITICAL_TAGS)
- tagorder = debianbts.TAGLIST + debianbts.CRITICAL_TAGLIST
- else:
- tags = debianbts.TAGS
- tagorder = debianbts.TAGLIST
+ tags = debianbts.get_tags(severity)
taglist = ui.select_multiple(
'Do any of the following apply to this report?', tags,
- 'Please select tags: ', order=tagorder,
- extras=debianbts.EXTRA_TAGS)
+ 'Please select tags: ')
patch = ('patch' in taglist)
diff --git a/debian/changelog b/debian/changelog
index d71d056..a77ad47 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -40,8 +40,16 @@ reportbug (4.10.3) UNRELEASED; urgency=low
report; Closes: #562853
- don't ask to choose a UI when there is only one choice; thanks to Olaf van
der Spek for the report and to Carl Chenet for the patch; Closes: #567501
-
- -- Sandro Tosi <morph at debian.org> Wed, 10 Mar 2010 20:53:39 +0100
+ * bin/reportbug, reportbug/{debianbts.py, ui/urwid_ui.py}
+ - reorganized how BTS tags are retrieved and used
+ - create a get_tags() method to return the tags depending on severity of bug
+ report (for example, 'security' is available only if severity is RC)
+ - remove TAGLIST and EXTRA_TAGS, no more used
+ - update the tags list, including all those supported by BTS, not restricted
+ to Release Team and meaningfull at report time; thanks to Ido Kanner and
+ to martin f krafft for the reports; Closes: #286745, #498919, #524511
+
+ -- Sandro Tosi <morph at debian.org> Fri, 12 Mar 2010 00:04:36 +0100
reportbug (4.10.2) unstable; urgency=low
diff --git a/reportbug/debianbts.py b/reportbug/debianbts.py
index 30a491e..dc39f68 100644
--- a/reportbug/debianbts.py
+++ b/reportbug/debianbts.py
@@ -642,19 +642,28 @@ CRITICAL_TAGS = {
TAGS = {
'patch' : 'You are including a patch to fix this problem.',
-## 'upstream' : 'You believe this problem is not specific to Debian.',
-## 'potato' : 'This bug only applies to the potato release (Debian 2.2).',
-## 'woody' : 'This bug only applies to the woody release (Debian 3.0).',
-## 'sarge' : 'This bug only applies to the sarge release (Debian 3.1).',
-## 'sid' : 'This bug only applies to the unstable branch of Debian.',
- "l10n" : "This bug reports a localization/internationalization issue.",
-## 'done' : 'No more tags.',
+ 'upstream' : 'This bug applies to the upstream part of the package.',
+ 'd-i' : 'This bug is relevant to the development of debian-installer.',
+ 'ipv6' : 'This bug affects support for Internet Protocol version 6.',
+ 'lfs' : 'This bug affects support for large files (over 2 gigabytes).',
+ 'lenny' : 'This bug only applies to the lenny release (Debian 5.0).',
+ 'squeeze' : 'This bug only applies to the squeeze release.',
+ 'sid' : 'This bug only applies to the unstable branch of Debian.',
+ 'experimental' : 'This bug only applies to the unstable branch of Debian.',
+ 'l10n' : 'This bug reports a localization/internationalization issue.'
}
-EXTRA_TAGS = ['potato', 'woody', 'sarge', 'security', 'sid', 'upstream']
+def get_tags(severity=''):
+ """Returns the current tags list.
-TAGLIST = ['l10n', 'patch']
-CRITICAL_TAGLIST = ['security']
+ If severity is release critical, than add additional tags not always present."""
+
+ if severity in ('grave', 'critical', 'serious'):
+ temp_tags = TAGS.copy()
+ temp_tags.update(CRITICAL_TAGS)
+ return temp_tags
+ else:
+ return TAGS
def yn_bool(setting):
if setting:
diff --git a/reportbug/ui/urwid_ui.py b/reportbug/ui/urwid_ui.py
index 239cc9b..ad39335 100644
--- a/reportbug/ui/urwid_ui.py
+++ b/reportbug/ui/urwid_ui.py
@@ -679,14 +679,11 @@ def test():
import debianbts
- tags = debianbts.TAGS.copy()
- tags.update(debianbts.CRITICAL_TAGS)
- tagorder = debianbts.TAGLIST + debianbts.CRITICAL_TAGLIST
+ tags = debianbts.get_tags()
taglist = select_multiple(
'Do any of the following apply to this report?', tags,
- 'Please select tags: ', order=tagorder,
- extras=debianbts.EXTRA_TAGS)
+ 'Please select tags: ')
print >> fp, taglist
if __name__ == '__main__':
--
Reportbug - reports bugs in the Debian distribution
More information about the Reportbug-commits
mailing list