[Reportbug-maint] Bug#661563: reportbug: suggest contacting debian-user when unsure about which package to file against
Jonathan Nieder
jrnieder at gmail.com
Tue Feb 28 00:54:18 UTC 2012
Package: reportbug
Version: 6.3.1
Severity: wishlist
Tags: patch
Hi,
Don Armstrong wrote[1]:
> http://www.debian.org/Bugs/Reporting already tells people to contact
> -user if they are unable to determine which package their bug report
> should be filed against. I suppose text could be added to reportbug to
> mimic this... perhaps changing:
>
> Please enter the name of the package in which you have found a problem, or type 'other' to report a more general problem.
>
> to
>
> Please enter the name of the package in which you have found a problem, or type 'other' to report a more general problem.
> If you don't know what package the bug is in, please contact debian-user at lists.debian.org for assistance.
>
> [and the list can be changed as needed for l10n.]
Thanks, this is a nice idea.
While looking over the relevant code path, I noticed that reportbug
already has a prompt for reports against general, project, (progeny's)
debian-general, and base:
Enter a package: general
Are you sure this bug doesn't apply to a specific package? [y|N|q|?]?
If I am desperate to get my bug report to someone appropriate and do
not know which specific package would be appropriate, that reminder
would not help much, though.
I've attached two patches: the first implements the wording suggestion
Don suggested, and the second makes sure the line break gets through
to the console to make it a little more readable. Thoughts of all
kinds welcome.
Thanks for your thoughtfulness.
Jonathan
[1] http://thread.gmane.org/gmane.linux.debian.devel.general/170079
-------------- next part --------------
bin/reportbug | 2 ++
debian/changelog | 7 +++++++
2 files changed, 9 insertions(+)
diff --git a/bin/reportbug b/bin/reportbug
index 3531e4ae..f81773c5 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -438,6 +438,8 @@ def get_package_name(bts='debian', mode=MODE_EXPERT):
prompt += ", or type 'other' to report a more general problem."
else:
prompt += '.'
+ prompt += "\nIf you don't know what package the bug is in, "\
+ "please contact debian-user at lists.debian.org for assistance."
options = []
pkglist = commands.getoutput('apt-cache pkgnames')
diff --git a/debian/changelog b/debian/changelog
index 4917f4f3..8b1453ff 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
reportbug (6.3.2) UNRELEASED; urgency=low
+ [ Sandro Tosi ]
* reportbug/checkversions.py
- match version on the precise architecture, not just check string
inclusiong; thanks to Nelson de Oliveira for the report; Closes: #650651
@@ -23,6 +24,12 @@ reportbug (6.3.2) UNRELEASED; urgency=low
from a file (adding a versioned depends); thanks to David Paleino for the
report; Closes: #661221
+ [ Jonathan Nieder ]
+ * bin/reportbug
+ - when it is unclear which package to file against, suggest asking the
+ Debian user mailing list for advice. Thanks to Don Armstrong for the
+ idea.
+
-- Sandro Tosi <morph at debian.org> Sat, 25 Feb 2012 11:14:28 +0100
reportbug (6.3.1) unstable; urgency=low
--
1.7.9.2
-------------- next part --------------
debian/changelog | 2 ++
reportbug/ui/text_ui.py | 20 ++++++++++++--------
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 8b1453ff..09976140 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -29,6 +29,8 @@ reportbug (6.3.2) UNRELEASED; urgency=low
- when it is unclear which package to file against, suggest asking the
Debian user mailing list for advice. Thanks to Don Armstrong for the
idea.
+ * reportbug/ui/text_ui.py
+ - preserve line breaks in multiline prompts
-- Sandro Tosi <morph at debian.org> Sat, 25 Feb 2012 11:14:28 +0100
diff --git a/reportbug/ui/text_ui.py b/reportbug/ui/text_ui.py
index 0a07dca9..edd6044f 100644
--- a/reportbug/ui/text_ui.py
+++ b/reportbug/ui/text_ui.py
@@ -85,15 +85,19 @@ def indent_wrap_text(text, starttext='', indent=0, linelen=None):
else:
si = ''
- text = ' '.join(text.split())
- if not text:
- return starttext+'\n'
+ result = ''
+ for line in text.splitlines():
+ line = ' '.join(line.split())
+ if not line:
+ result += '\n'
+ continue
- output = textwrap.fill(text, width=linelen, initial_indent=starttext,
- subsequent_indent=si)
- if output.endswith('\n'):
- return output
- return output + '\n'
+ output = textwrap.fill(line, width=linelen, initial_indent=starttext,
+ subsequent_indent=si)
+ result += output
+ if not output.endswith('\n'):
+ result += '\n'
+ return result
# Readline support, if available
if readline is not None:
--
1.7.9.2
More information about the Reportbug-maint
mailing list