diff -Nru reportbug-6.6.5ubuntu1/bin/querybts reportbug-6.6.6ubuntu1/bin/querybts --- reportbug-6.6.5ubuntu1/bin/querybts 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/bin/querybts 2016-01-02 10:14:02.000000000 +0000 @@ -3,7 +3,7 @@ # querybts - Examine the state of a debbugs server # Written by Chris Lawrence # (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2015 Sandro Tosi +# Copyright (C) 2008-2016 Sandro Tosi # # This program is freely distributable per the following license: # diff -Nru reportbug-6.6.5ubuntu1/bin/reportbug reportbug-6.6.6ubuntu1/bin/reportbug --- reportbug-6.6.5ubuntu1/bin/reportbug 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/bin/reportbug 2016-01-02 10:14:02.000000000 +0000 @@ -3,7 +3,7 @@ # reportbug - Report a bug in the Debian distribution. # Written by Chris Lawrence # Copyright (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2015 Sandro Tosi +# Copyright (C) 2008-2016 Sandro Tosi # # This program is freely distributable per the following license: # @@ -987,7 +987,7 @@ dest='querydpkg', help='check whether the specified ' 'package is installed when filing a report (default)') parser.add_option('--exit-prompt', action='store_true', dest='exitprompt', - help='prompt before exiting') + help='prompt before exiting', default=False) parser.add_option('--paranoid', action='store_true', dest='paranoid', help='show contents of message before sending') parser.add_option('--no-paranoid', action='store_false', dest='paranoid', @@ -1777,8 +1777,8 @@ ui.long_message('''\ This package seems to be currently "orphaned"; it also seems you're a bit interested in this package, since you're reporting a bug against -it, so you might consider adopting it. Please be aware that your -report may not be resolved for a while, because the package lacks an +it, so you might consider being involved in the package maintenance in Debian and/or adopting it. Please be aware that your +report may not be resolved for a while, because the package seems to lack an active maintainer, but please GO ON and REPORT the bug, if there is one. @@ -1839,7 +1839,7 @@ "\nSend modified configuration files", 'Ynd', {'y': 'Send your modified configuration files.', 'n': "Don't send modified configuration files.", - 'd': 'Display modified configuration files.'}) + 'd': 'Display modified configuration files (exit with "q").'}) if x == 'n': for f in changed: confinfo[f] = 'changed [not included]' diff -Nru reportbug-6.6.5ubuntu1/debian/changelog reportbug-6.6.6ubuntu1/debian/changelog --- reportbug-6.6.5ubuntu1/debian/changelog 2015-09-19 03:50:20.000000000 +0000 +++ reportbug-6.6.6ubuntu1/debian/changelog 2016-01-16 04:34:51.000000000 +0000 @@ -1,3 +1,63 @@ +reportbug (6.6.6ubuntu1) xenial; urgency=medium + + * Merge from Debian unstable. Remaining changes: + - bin/reportbug: If bts=ubuntu or unconfigured, exit with an error and + refer user to "ubuntu-bug" instead. + - reportbug/__init__.py: Match reportbug version with package version. + - debian/control: Add prominent note to package description. + - debian/{rules,dirs}: Do not install .desktop file. + + -- Logan Rosen Fri, 15 Jan 2016 23:33:48 -0500 + +reportbug (6.6.6) unstable; urgency=medium + + * reportbug/utils.py + - Update the SUITES2DISTS mapping for the jessie release; patch by Paul Wise + - 'Control' pseudo-header can be repeated/present multiple times in the + report; Closes: #687679 + * man/querybts.1 + - document http_proxy environment variable in querybts manpage; report and + patch by Jakub Wilk; Closes: #800092 + * Consolidate Debian release codenames handling in a single place, updating + how release.d.o is using this information; Closes: #804504 + * bin/reportbug + - rephrase slightly the orphan check warning; Closes: #544624 + - where there are modified conffiles, clarify the menu entry to view such + files that a "q" is required to exit it, making it more clear in the GTK + UI; Closes: #732334 + - default '--exitprompt' to False, should avoid a spurious message in GTK UI + when reporting additional information; Closes: #745514 + * reportbug/submit.py + - in paranoid mode, handle the case when the pager exists without having + processed all the text we are sending and it generates a SIGPIPE; + Closes: #777010, #686922 + - decode email addresses when printing the recipients recap at submit time; + Closes: #546914 + - dont escape a single dot line surrounded by newlines (the End-Of-Message + in SMTP), it is done by sendmail() automatically; Closes: #808742 + - print the "If you want to provide additional information" text only if an + email is specified in sysinfo, this prevents a crash if we are sending + reports to a non-debbugs instance; Closes: #789332 + - save a backup of the bug report, that will prevent data loss in case of + crash or unexpected errors; Closes: #736214 + * debian/control + - add dep on 'file' for python-reportbug; Closes: #803764 + * reportbug/ui/text_ui.py + - dont crash when selecting "Providing additional information" after + filtering the bugs list more than once; Closes: #804130 + * reportbug/ui/gtk2_ui.py + - switch from gtkspell (now removed) to gtkspellcheck; Closes: #802387 + * man/querybts.1 + - remove reference to BROWSER env variable, we use xdg-open; Closes: #690759 + * reportbug/urlutils.py + - remove handling of X11BROWSER and CONSOLEBROWSER, obsolete + - explicitly set the timeout when requesting a URL, that happens in + particular when checking for newer versions; Closes: #784840 + * reportbug/ui/* + - dont crash if we cant access the BTS: Closes: #694634 + + -- Sandro Tosi Sat, 02 Jan 2016 01:47:46 +0000 + reportbug (6.6.5ubuntu1) wily; urgency=medium * Merge from Debian unstable. Remaining changes: @@ -5551,3 +5611,4 @@ * Initial Release. -- Chris Lawrence Fri, 14 May 1999 05:38:23 -0500 + diff -Nru reportbug-6.6.5ubuntu1/debian/control reportbug-6.6.6ubuntu1/debian/control --- reportbug-6.6.5ubuntu1/debian/control 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/debian/control 2016-01-02 10:14:03.000000000 +0000 @@ -15,7 +15,7 @@ Package: reportbug Architecture: all Depends: ${misc:Depends}, ${python:Depends}, apt, python-reportbug (= ${source:Version}) -Suggests: postfix | exim4 | mail-transport-agent, gnupg | pgp, debconf-utils (>> 1.1.0), debsums (>= 2.0.47), file (>> 1.30), dlocate, python-urwid, python-gtk2, python-vte, python-gtkspell, xdg-utils, emacs23-bin-common | emacs24-bin-common, claws-mail (>= 3.8.0) +Suggests: postfix | exim4 | mail-transport-agent, gnupg | pgp, debconf-utils (>> 1.1.0), debsums (>= 2.0.47), file (>> 1.30), dlocate, python-urwid, python-gtk2, python-vte, python-gtkspellcheck, xdg-utils, emacs23-bin-common | emacs24-bin-common, claws-mail (>= 3.8.0) Description: reports bugs in the Debian distribution reportbug is a tool designed to make the reporting of bugs in Debian and derived distributions relatively painless. Its features include: @@ -42,7 +42,7 @@ Package: python-reportbug Section: python Architecture: all -Depends: ${misc:Depends}, ${python:Depends}, apt, python-debian, python-debianbts (>= 1.13) +Depends: ${misc:Depends}, ${python:Depends}, apt, python-debian, python-debianbts (>= 1.13), file Suggests: reportbug Description: Python modules for interacting with bug tracking systems reportbug is a tool designed to make the reporting of bugs in Debian diff -Nru reportbug-6.6.5ubuntu1/debian/copyright reportbug-6.6.6ubuntu1/debian/copyright --- reportbug-6.6.5ubuntu1/debian/copyright 2015-09-19 03:48:03.000000000 +0000 +++ reportbug-6.6.6ubuntu1/debian/copyright 2016-01-02 10:14:03.000000000 +0000 @@ -8,7 +8,7 @@ Files: * Copyright: © 1999-2006 Chris Lawrence - Copyright (C) 2008-2015 Sandro Tosi + Copyright (C) 2008-2016 Sandro Tosi License: other # This program is freely distributable per the following license: # @@ -38,13 +38,6 @@ On Debian systems, the complete text of the GNU General Public License can be found in file "/usr/share/common-licenses/GPL". -Files: checks/compare_pseudo-pkgs_lists.py -Copyright: - © 2008 Sandro Tosi -License: PD - checks/compare_pseudo-pkgs_lists.py was placed in public domain by Sandro - Tosi - Files: reportbug/ui/gtk2_ui.py Copyright: Copyright (C) 2006 Philipp Kern diff -Nru reportbug-6.6.5ubuntu1/.idea/encodings.xml reportbug-6.6.6ubuntu1/.idea/encodings.xml --- reportbug-6.6.5ubuntu1/.idea/encodings.xml 2015-09-19 03:48:03.000000000 +0000 +++ reportbug-6.6.6ubuntu1/.idea/encodings.xml 2016-01-02 10:14:03.000000000 +0000 @@ -1,4 +1,6 @@ - + + + \ No newline at end of file diff -Nru reportbug-6.6.5ubuntu1/.idea/misc.xml reportbug-6.6.6ubuntu1/.idea/misc.xml --- reportbug-6.6.5ubuntu1/.idea/misc.xml 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/.idea/misc.xml 2016-01-02 10:14:03.000000000 +0000 @@ -10,5 +10,5 @@ - + \ No newline at end of file diff -Nru reportbug-6.6.5ubuntu1/.idea/reportbug.iml reportbug-6.6.6ubuntu1/.idea/reportbug.iml --- reportbug-6.6.5ubuntu1/.idea/reportbug.iml 2015-09-19 03:48:03.000000000 +0000 +++ reportbug-6.6.6ubuntu1/.idea/reportbug.iml 2016-01-02 10:14:03.000000000 +0000 @@ -2,7 +2,7 @@ - + \ No newline at end of file diff -Nru reportbug-6.6.5ubuntu1/.idea/workspace.xml reportbug-6.6.6ubuntu1/.idea/workspace.xml --- reportbug-6.6.5ubuntu1/.idea/workspace.xml 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/.idea/workspace.xml 2016-01-02 10:14:03.000000000 +0000 @@ -20,34 +20,52 @@ - - - + + + - + - + + + + + + + - - + + - - + + - - + + + + + + + + + + + + + + - + @@ -67,15 +85,11 @@ - - - - @@ -148,8 +162,14 @@ + + + + + + @@ -230,19 +250,15 @@ - - - - - - + + @@ -382,28 +398,29 @@ - - + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -421,16 +438,12 @@ - file://$PROJECT_DIR$/reportbug/submit.py - 21 - - file://$PROJECT_DIR$/reportbug/bugreport.py 22 - @@ -440,11 +453,13 @@ - - - - - + + + + + + + @@ -492,13 +507,6 @@ - - - - - - - @@ -586,43 +594,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -630,7 +605,6 @@ - @@ -648,34 +622,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -683,9 +633,6 @@ - - - @@ -693,9 +640,6 @@ - - - @@ -703,7 +647,6 @@ - @@ -711,9 +654,6 @@ - - - @@ -721,9 +661,6 @@ - - - @@ -731,9 +668,6 @@ - - - @@ -741,7 +675,6 @@ - @@ -749,7 +682,6 @@ - @@ -757,7 +689,6 @@ - @@ -765,7 +696,6 @@ - @@ -773,7 +703,6 @@ - @@ -781,91 +710,133 @@ - - + - - - - - + + - + - - - - - + + - + - - + + - + - + - + - + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - + - + - + - + - + + + + + + + - + - - + + + + + + + + + + + + \ No newline at end of file diff -Nru reportbug-6.6.5ubuntu1/man/querybts.1 reportbug-6.6.6ubuntu1/man/querybts.1 --- reportbug-6.6.5ubuntu1/man/querybts.1 2015-09-19 03:48:03.000000000 +0000 +++ reportbug-6.6.6ubuntu1/man/querybts.1 2016-01-02 10:14:03.000000000 +0000 @@ -96,12 +96,7 @@ Options only supported by \fBreportbug\fP will be silently ignored. .SH ENVIRONMENT .TP -.B BROWSER -Colon-separated list of web browsers to try; they will be tried in -order, until one succeeds. You can use \fB%s\fP to substitute the URL -to be used, and \fB%%\fP to insert a literal percent sign. If no -\fB%s\fP is specified, the URL will be supplied as a normal argument. -.TP +.B http_proxy Provides the address of a proxy server to handle the BTS query. This should be a valid \fBhttp\fP URL for a proxy server, including any required port number (simply specifying a hostname, or omitting a port diff -Nru reportbug-6.6.5ubuntu1/reportbug/bugreport.py reportbug-6.6.6ubuntu1/reportbug/bugreport.py --- reportbug-6.6.5ubuntu1/reportbug/bugreport.py 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/reportbug/bugreport.py 2016-01-02 10:14:03.000000000 +0000 @@ -2,7 +2,7 @@ # bugreport module - object containing bug stuff for reporting # Written by Chris Lawrence # Copyright (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2015 Sandro Tosi +# Copyright (C) 2008-2016 Sandro Tosi # # This program is freely distributable per the following license: # Binary files /tmp/tmpgd4Q4O/vqFS0wSFGa/reportbug-6.6.5ubuntu1/reportbug/bugreport.pyc and /tmp/tmpgd4Q4O/313eDM4sZr/reportbug-6.6.6ubuntu1/reportbug/bugreport.pyc differ diff -Nru reportbug-6.6.5ubuntu1/reportbug/checkbuildd.py reportbug-6.6.6ubuntu1/reportbug/checkbuildd.py --- reportbug-6.6.5ubuntu1/reportbug/checkbuildd.py 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/reportbug/checkbuildd.py 2016-01-02 10:14:03.000000000 +0000 @@ -3,7 +3,7 @@ # # Written by Chris Lawrence # (C) 2002-08 Chris Lawrence -# Copyright (C) 2008-2015 Sandro Tosi +# Copyright (C) 2008-2016 Sandro Tosi # # This program is freely distributable per the following license: # Binary files /tmp/tmpgd4Q4O/vqFS0wSFGa/reportbug-6.6.5ubuntu1/reportbug/checkbuildd.pyc and /tmp/tmpgd4Q4O/313eDM4sZr/reportbug-6.6.6ubuntu1/reportbug/checkbuildd.pyc differ diff -Nru reportbug-6.6.5ubuntu1/reportbug/checkversions.py reportbug-6.6.6ubuntu1/reportbug/checkversions.py --- reportbug-6.6.5ubuntu1/reportbug/checkversions.py 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/reportbug/checkversions.py 2016-01-02 10:14:03.000000000 +0000 @@ -3,7 +3,7 @@ # # Written by Chris Lawrence # (C) 2002-08 Chris Lawrence -# Copyright (C) 2008-2015 Sandro Tosi +# Copyright (C) 2008-2016 Sandro Tosi # # This program is freely distributable per the following license: # @@ -134,7 +134,7 @@ if len(l) != 4: continue # map suites name (returned by madison) to dist name - dist = utils.SUITES2DISTS.get(l[2], l[2]) + dist = utils.CODENAME2SUITE.get(l[2], l[2]) versions[dist] = l[1] return versions Binary files /tmp/tmpgd4Q4O/vqFS0wSFGa/reportbug-6.6.5ubuntu1/reportbug/checkversions.pyc and /tmp/tmpgd4Q4O/313eDM4sZr/reportbug-6.6.6ubuntu1/reportbug/checkversions.pyc differ diff -Nru reportbug-6.6.5ubuntu1/reportbug/debbugs.py reportbug-6.6.6ubuntu1/reportbug/debbugs.py --- reportbug-6.6.5ubuntu1/reportbug/debbugs.py 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/reportbug/debbugs.py 2016-01-02 10:14:03.000000000 +0000 @@ -3,7 +3,7 @@ # # Written by Chris Lawrence # (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2015 Sandro Tosi +# Copyright (C) 2008-2016 Sandro Tosi # # This program is freely distributable per the following license: # @@ -387,6 +387,16 @@ archs = None version = None + oldstable = utils.SUITE2CODENAME['oldstable'] + oldstable_pu = oldstable + '-pu' + oldstable_backports = oldstable + '-backports' + oldstable_security = oldstable + '-security' + stable = utils.SUITE2CODENAME['stable'] + stable_pu = stable + '-pu' + stable_backports = stable + '-backports' + stable_security = stable + '-security' + testing = utils.SUITE2CODENAME['testing'] + 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 ' @@ -395,8 +405,8 @@ 'britney': "testing migration script bugs", 'transition': "transition tracking", 'unblock': "unblock requests", - 'wheezy-pu': "wheezy proposed updates requests", - 'jessie-pu': "jessie proposed updates requests", + oldstable_pu: "%s proposed updates requests" % oldstable, + stable_pu: "%s proposed updates requests" % stable, 'rm': "Stable/Testing removal requests", 'other': "None of the other options", }, 'Choose the request type: ', empty_ok=True) @@ -441,7 +451,7 @@ else: package = info[12] or package - if tag in ('binnmu', 'unblock', 'jessie-pu', 'wheezy-pu', 'rm'): + if tag in ('binnmu', 'unblock', stable_pu, oldstable_pu, 'rm'): # FIXME: pu/rm should lookup the version elsewhere version = info and info[0] if online and tag.endswith('-pu'): @@ -480,13 +490,13 @@ if tag == 'binnmu': suite = ui.menu("For which suite are you requesting this binNMU?" " Don't select anything for \"unstable\"", { - 'jessie': "", - 'jessie-backports': "", - 'jessie-security': "", - 'wheezy': "", - 'wheezy-backports': "", - 'wheezy-security': "", - 'stretch': "", + stable: "", + stable_backports: "", + stable_security: "", + oldstable: "", + oldstable_backports: "", + oldstable_security: "", + testing: "", 'experimental': "", }, 'Choose the suite: ', empty_ok=True) if not suite: Binary files /tmp/tmpgd4Q4O/vqFS0wSFGa/reportbug-6.6.5ubuntu1/reportbug/debbugs.pyc and /tmp/tmpgd4Q4O/313eDM4sZr/reportbug-6.6.6ubuntu1/reportbug/debbugs.pyc differ diff -Nru reportbug-6.6.5ubuntu1/reportbug/exceptions.py reportbug-6.6.6ubuntu1/reportbug/exceptions.py --- reportbug-6.6.5ubuntu1/reportbug/exceptions.py 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/reportbug/exceptions.py 2016-01-02 10:14:03.000000000 +0000 @@ -1,7 +1,7 @@ # Exceptions for reportbug # Written by Chris Lawrence # (C) 2002-04 Chris Lawrence -# Copyright (C) 2008-2015 Sandro Tosi +# Copyright (C) 2008-2016 Sandro Tosi # # This program is freely distributable per the following license: # Binary files /tmp/tmpgd4Q4O/vqFS0wSFGa/reportbug-6.6.5ubuntu1/reportbug/exceptions.pyc and /tmp/tmpgd4Q4O/313eDM4sZr/reportbug-6.6.6ubuntu1/reportbug/exceptions.pyc differ diff -Nru reportbug-6.6.5ubuntu1/reportbug/hiermatch.py reportbug-6.6.6ubuntu1/reportbug/hiermatch.py --- reportbug-6.6.5ubuntu1/reportbug/hiermatch.py 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/reportbug/hiermatch.py 2016-01-02 10:14:03.000000000 +0000 @@ -1,7 +1,7 @@ # hiermatch - Doing match on a list of string or a hierarchy. # Written by Chris Lawrence # Copyright (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2015 Sandro Tosi +# Copyright (C) 2008-2016 Sandro Tosi import re import exceptions Binary files /tmp/tmpgd4Q4O/vqFS0wSFGa/reportbug-6.6.5ubuntu1/reportbug/hiermatch.pyc and /tmp/tmpgd4Q4O/313eDM4sZr/reportbug-6.6.6ubuntu1/reportbug/hiermatch.pyc differ diff -Nru reportbug-6.6.5ubuntu1/reportbug/__init__.py reportbug-6.6.6ubuntu1/reportbug/__init__.py --- reportbug-6.6.5ubuntu1/reportbug/__init__.py 2015-09-19 03:48:48.000000000 +0000 +++ reportbug-6.6.6ubuntu1/reportbug/__init__.py 2016-01-16 04:33:15.000000000 +0000 @@ -3,7 +3,7 @@ # reportbug - Report a bug in the Debian distribution. # Written by Chris Lawrence # Copyright (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2015 Sandro Tosi +# Copyright (C) 2008-2016 Sandro Tosi # # This program is freely distributable per the following license: # @@ -25,8 +25,8 @@ __all__ = ['bugreport', 'utils', 'urlutils', 'checkbuildd', 'checkversions', 'debbugs', 'exceptions', 'submit', 'tempfile'] -VERSION_NUMBER = "6.6.5ubuntu1" +VERSION_NUMBER = "6.6.6ubuntu1" VERSION = "reportbug " + VERSION_NUMBER COPYRIGHT = VERSION + '\nCopyright (C) 1999-2008 Chris Lawrence ' + \ - '\nCopyright (C) 2008-2015 Sandro Tosi ' + '\nCopyright (C) 2008-2016 Sandro Tosi ' Binary files /tmp/tmpgd4Q4O/vqFS0wSFGa/reportbug-6.6.5ubuntu1/reportbug/__init__.pyc and /tmp/tmpgd4Q4O/313eDM4sZr/reportbug-6.6.6ubuntu1/reportbug/__init__.pyc differ diff -Nru reportbug-6.6.5ubuntu1/reportbug/submit.py reportbug-6.6.6ubuntu1/reportbug/submit.py --- reportbug-6.6.5ubuntu1/reportbug/submit.py 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/reportbug/submit.py 2016-01-02 10:14:03.000000000 +0000 @@ -1,7 +1,7 @@ # reportbug_submit module - email and GnuPG functions # Written by Chris Lawrence # Copyright (C) 1999-2006 Chris Lawrence -# Copyright (C) 2008-2015 Sandro Tosi +# Copyright (C) 2008-2016 Sandro Tosi # # This program is freely distributable per the following license: # @@ -34,7 +34,7 @@ from email.MIMEImage import MIMEImage from email.MIMEBase import MIMEBase from email.MIMEMessage import MIMEMessage -from email.Header import Header +from email.Header import Header, decode_header import mimetypes from __init__ import VERSION, VERSION_NUMBER @@ -44,6 +44,7 @@ ) import ui.text_ui as ui from utils import get_email_addr +import errno quietly = False @@ -95,6 +96,12 @@ return encode_if_needed(header, charset) +def decode_email_header(header): + # returns a list of 2-items tuples + decoded = decode_header(header) + return ' '.join([x[0] for x in decoded]).strip() + + # Cheat for now. # ewrite() may put stuff on the status bar or in message boxes depending on UI def ewrite(*args): @@ -311,7 +318,13 @@ message = message.as_string() if paranoid and not (template or printonly): pager = os.environ.get('PAGER', 'sensible-pager') - os.popen(pager, 'w').write(message) + try: + os.popen(pager, 'w').write(message) + except Exception, e: + # if the PAGER exits before all the text has been sent, + # it'd send a SIGPIPE, so crash only if that's not the case + if e.errno != errno.EPIPE: + raise e if not ui.yes_no('Does your report seem satisfactory', 'Yes, send it.', 'No, don\'t send it.'): smtphost = mta = None @@ -363,9 +376,14 @@ mta, commands.mkarg(envfrom), jalist), 'w') using_sendmail = True + # saving a backup of the report + backupfh, backupname = TempFile(prefix=tempfile_prefix(package, 'backup'), dir=draftpath) + ewrite('Saving a backup of the report at %s\n', backupname) + backupfh.write(message) + backupfh.close() + if smtphost: toaddrs = [x[1] for x in alist] - smtp_message = re.sub(r'(?m)^[.]', '..', message) tryagain = True refused = None @@ -395,7 +413,7 @@ 'Enter SMTP password for %s@%s: ' % (smtpuser, smtphost)) conn.login(smtpuser, smtppasswd) - refused = conn.sendmail(fromaddr, toaddrs, smtp_message) + refused = conn.sendmail(fromaddr, toaddrs, message) conn.quit() except (socket.error, smtplib.SMTPException), x: # If wrong password, try again... @@ -488,14 +506,14 @@ if len(addresses): ewrite("Copies sent to:\n") for address in addrs: - ewrite(' %s\n', address) + ewrite(' %s\n', decode_email_header(address)) if debbugs_cc and rtype == 'debbugs': ewrite("Copies will be sent after processing to:\n") for address in cclist: - ewrite(' %s\n', address) + ewrite(' %s\n', decode_email_header(address)) - if not (exinfo or kudos) and rtype == 'debbugs' and sysinfo and not failed \ + if not (exinfo or kudos) and rtype == 'debbugs' and sysinfo and 'email' in sysinfo and not failed \ and mailing: ewrite('\n') ui.final_message( Binary files /tmp/tmpgd4Q4O/vqFS0wSFGa/reportbug-6.6.5ubuntu1/reportbug/submit.pyc and /tmp/tmpgd4Q4O/313eDM4sZr/reportbug-6.6.6ubuntu1/reportbug/submit.pyc differ diff -Nru reportbug-6.6.5ubuntu1/reportbug/tempfiles.py reportbug-6.6.6ubuntu1/reportbug/tempfiles.py --- reportbug-6.6.5ubuntu1/reportbug/tempfiles.py 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/reportbug/tempfiles.py 2016-01-02 10:14:03.000000000 +0000 @@ -2,7 +2,7 @@ # tempfiles module - Temporary file handling for reportbug # Written by Chris Lawrence # (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2015 Sandro Tosi +# Copyright (C) 2008-2016 Sandro Tosi # # This program is freely distributable per the following license: # Binary files /tmp/tmpgd4Q4O/vqFS0wSFGa/reportbug-6.6.5ubuntu1/reportbug/tempfiles.pyc and /tmp/tmpgd4Q4O/313eDM4sZr/reportbug-6.6.6ubuntu1/reportbug/tempfiles.pyc differ diff -Nru reportbug-6.6.5ubuntu1/reportbug/ui/gtk2_ui.py reportbug-6.6.6ubuntu1/reportbug/ui/gtk2_ui.py --- reportbug-6.6.5ubuntu1/reportbug/ui/gtk2_ui.py 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/reportbug/ui/gtk2_ui.py 2016-01-02 10:14:03.000000000 +0000 @@ -30,7 +30,7 @@ global vte try: - import gtkspell + import gtkspellcheck has_spell = True except: has_spell = False @@ -907,7 +907,11 @@ (count, sectitle, hierarchy) = debbugs.get_reports( package, timeout, bts, mirrors=mirrors, version=version, http_proxy=http_proxy, archived=archived, source=source) + except: + error_dialog("Unable to connect to %s BTS." % sysinfo['name']) + raise NoBugs + try: if not count: if hierarchy is None: raise NoPackage @@ -931,8 +935,6 @@ return(report, sectitle), {} - except(IOError, NoNetwork): - error_dialog("Unable to connect to %s BTS." % sysinfo['name']) except NoPackage: error_dialog('No record of this package found.') raise NoPackage @@ -1145,7 +1147,7 @@ self.view.modify_font(pango.FontDescription("Monospace")) self.view.set_wrap_mode(gtk.WRAP_WORD) if has_spell: - gtkspell.Spell(self.view) + gtkspellcheck.SpellChecker(self.view) self.info_buffer = self.view.get_buffer() scrolled = create_scrollable(self.view) vbox.pack_start(scrolled) @@ -1160,7 +1162,7 @@ if not has_spell: box = gtk.EventBox() - label = gtk.Label("Please install python-gtkspell to enable spell checking") + label = gtk.Label("Please install python-gtkspellcheck to enable spell checking") label.set_use_markup(True) label.set_line_wrap(True) label.set_selectable(True) Binary files /tmp/tmpgd4Q4O/vqFS0wSFGa/reportbug-6.6.5ubuntu1/reportbug/ui/gtk2_ui.pyc and /tmp/tmpgd4Q4O/313eDM4sZr/reportbug-6.6.6ubuntu1/reportbug/ui/gtk2_ui.pyc differ diff -Nru reportbug-6.6.5ubuntu1/reportbug/ui/__init__.py reportbug-6.6.6ubuntu1/reportbug/ui/__init__.py --- reportbug-6.6.5ubuntu1/reportbug/ui/__init__.py 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/reportbug/ui/__init__.py 2016-01-02 10:14:03.000000000 +0000 @@ -3,7 +3,7 @@ # reportbug - Report a bug in the Debian distribution. # Written by Chris Lawrence # Copyright (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2015 Sandro Tosi +# Copyright (C) 2008-2016 Sandro Tosi # # This program is freely distributable per the following license: # Binary files /tmp/tmpgd4Q4O/vqFS0wSFGa/reportbug-6.6.5ubuntu1/reportbug/ui/__init__.pyc and /tmp/tmpgd4Q4O/313eDM4sZr/reportbug-6.6.6ubuntu1/reportbug/ui/__init__.pyc differ diff -Nru reportbug-6.6.5ubuntu1/reportbug/ui/text_ui.py reportbug-6.6.6ubuntu1/reportbug/ui/text_ui.py --- reportbug-6.6.5ubuntu1/reportbug/ui/text_ui.py 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/reportbug/ui/text_ui.py 2016-01-02 10:14:03.000000000 +0000 @@ -1,7 +1,7 @@ # Text user interface for reportbug # Written by Chris Lawrence # (C) 2001-08 Chris Lawrence -# Copyright (C) 2008-2015 Sandro Tosi +# Copyright (C) 2008-2016 Sandro Tosi # # This program is freely distributable per the following license: # @@ -534,7 +534,17 @@ (count, title, hierarchy) = debbugs.get_reports( package, timeout, bts, mirrors=mirrors, version=version, source=source, http_proxy=http_proxy, archived=archived) + except Exception, e: + ewrite('Unable to connect to %s BTS (error: "%s"); ' % (debbugs.SYSTEMS[bts]['name'], repr(e))) + res = select_options('continue', 'yN', + {'y': 'Keep going.', + 'n': 'Abort.'}) + if res == 'n': + raise NoNetwork + else: + raise NoBugs + try: # If there's no report, then skip all the rest if not count: if hierarchy is None: @@ -599,13 +609,6 @@ mirrors, http_proxy, timeout, screen, title, package, mbox_reader_cmd) - except (IOError, NoNetwork): - ewrite('Unable to connect to %s BTS; ', debbugs.SYSTEMS[bts]['name']) - res = select_options('continue', 'yN', - {'y': 'Keep going.', - 'n': 'Abort.'}) - if res == 'n': - raise NoNetwork except NoPackage: long_message('No record of this package found.') raise NoPackage @@ -946,7 +949,7 @@ # Do filter. Recursive done. retval = search_bugs(hierarchy, bts, queryonly, mirrors, http_proxy, timeout, screen, title, package, mbox_reader_cmd) - if retval == "FilterEnd": + if isinstance(retval, basestring) and retval in ["FilterEnd", "Top"]: continue else: return retval Binary files /tmp/tmpgd4Q4O/vqFS0wSFGa/reportbug-6.6.5ubuntu1/reportbug/ui/text_ui.pyc and /tmp/tmpgd4Q4O/313eDM4sZr/reportbug-6.6.6ubuntu1/reportbug/ui/text_ui.pyc differ diff -Nru reportbug-6.6.5ubuntu1/reportbug/ui/urwid_ui.py reportbug-6.6.6ubuntu1/reportbug/ui/urwid_ui.py --- reportbug-6.6.5ubuntu1/reportbug/ui/urwid_ui.py 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/reportbug/ui/urwid_ui.py 2016-01-02 10:14:03.000000000 +0000 @@ -1,7 +1,7 @@ # urwid user interface for reportbug # Written by Chris Lawrence # (C) 2006-08 Chris Lawrence -# Copyright (C) 2008-2015 Sandro Tosi +# Copyright (C) 2008-2016 Sandro Tosi # # This program is freely distributable per the following license: # @@ -579,7 +579,13 @@ (count, sectitle, hierarchy) = debbugs.get_reports( package, timeout, bts, mirrors=mirrors, version=version, http_proxy=http_proxy, archived=archived, source=source) + except Exception, e: + ui.run_wrapper(nullfunc) + long_message('Unable to connect to %s BTS.', sysinfo['name'], + title=title) + raise NoBugs + try: if not count: ui.run_wrapper(nullfunc) if hierarchy is None: @@ -640,10 +646,6 @@ result = res break - except (IOError, NoNetwork): - ui.run_wrapper(nullfunc) - long_message('Unable to connect to %s BTS.', sysinfo['name'], - title=title) except NoPackage: ui.run_wrapper(nullfunc) long_message('No record of this package found.', title=title) Binary files /tmp/tmpgd4Q4O/vqFS0wSFGa/reportbug-6.6.5ubuntu1/reportbug/ui/urwid_ui.pyc and /tmp/tmpgd4Q4O/313eDM4sZr/reportbug-6.6.6ubuntu1/reportbug/ui/urwid_ui.pyc differ diff -Nru reportbug-6.6.5ubuntu1/reportbug/urlutils.py reportbug-6.6.6ubuntu1/reportbug/urlutils.py --- reportbug-6.6.5ubuntu1/reportbug/urlutils.py 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/reportbug/urlutils.py 2016-01-02 10:14:03.000000000 +0000 @@ -3,7 +3,7 @@ # # Written by Chris Lawrence # (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2015 Sandro Tosi +# Copyright (C) 2008-2016 Sandro Tosi # # This program is freely distributable per the following license: # @@ -102,7 +102,7 @@ _opener = None -def urlopen(url, proxies=None, data=None): +def urlopen(url, proxies=None, timeout=60, data=None): global _opener if not proxies: @@ -130,7 +130,7 @@ # print _opener.handlers urllib2.install_opener(_opener) - return _opener.open(req) + return _opener.open(req, timeout=timeout) # Global useful URL opener; returns None if the page is absent, otherwise @@ -145,7 +145,7 @@ proxies['http'] = http_proxy try: - page = urlopen(url, proxies) + page = urlopen(url, proxies, timeout) except urllib2.HTTPError, x: if x.code in (404, 500, 503): return None @@ -177,14 +177,3 @@ if webbrowser: webbrowser.open(url) return - - X11BROWSER = os.environ.get('X11BROWSER', 'mozilla-firefox') - CONSOLEBROWSER = os.environ.get('CONSOLEBROWSER', 'lynx') - - if ('DISPLAY' in os.environ and - not os.system('command -v ' + X11BROWSER + ' &> /dev/null')): - cmd = "%s %s &" % (X11BROWSER, commands.mkarg(url)) - else: - cmd = "%s %s" % (CONSOLEBROWSER, commands.mkarg(url)) - - os.system(cmd) Binary files /tmp/tmpgd4Q4O/vqFS0wSFGa/reportbug-6.6.5ubuntu1/reportbug/urlutils.pyc and /tmp/tmpgd4Q4O/313eDM4sZr/reportbug-6.6.6ubuntu1/reportbug/urlutils.pyc differ diff -Nru reportbug-6.6.5ubuntu1/reportbug/utils.py reportbug-6.6.6ubuntu1/reportbug/utils.py --- reportbug-6.6.5ubuntu1/reportbug/utils.py 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/reportbug/utils.py 2016-01-02 10:14:03.000000000 +0000 @@ -2,7 +2,7 @@ # utils module - common functions for reportbug UIs # Written by Chris Lawrence # Copyright (C) 1999-2008 Chris Lawrence -# Copyright (C) 2008-2015 Sandro Tosi +# Copyright (C) 2008-2016 Sandro Tosi # # This program is freely distributable per the following license: # @@ -52,6 +52,8 @@ PSEUDOHEADERS = ('Package', 'Source', 'Version', 'Severity', 'File', 'Tags', 'Justification', 'Followup-For', 'Owner', 'User', 'Usertags', 'Forwarded', 'Control') +# These pseudo-headers can be repeated in the report +REPEATABLE_PSEUDOHEADERS = ['Control',] MODES = {'novice': 'Offer simple prompts, bypassing technical questions.', 'standard': 'Offer more extensive prompts, including asking about ' @@ -89,12 +91,15 @@ fhs_directories = ['/', '/usr', '/usr/share', '/var', '/usr/X11R6', '/usr/man', '/usr/doc', '/usr/bin'] -# A map between suites and distributions names -SUITES2DISTS = {'squeeze': 'oldstable', - 'wheezy': 'stable', - 'jessie': 'testing', +# A map between codenames and suites +CODENAME2SUITE = {'squeeze': 'oldoldstable', + 'wheezy': 'oldstable', + 'jessie': 'stable', + 'stretch': 'testing', + 'buster': 'next-testing', 'sid': 'unstable', 'experimental': 'experimental'} +SUITE2CODENAME = dict([(suite, codename) for codename, suite in CODENAME2SUITE.items()]) def realpath(filename): @@ -1165,6 +1170,7 @@ ph += [header] else: ph2 = {} + repeatable_ph = [] # generate a list of pseudoheaders, but without duplicates # we take the list of pseudoheaders defined in reportbug and add # the ones passed by the user (if not already present). We are not using @@ -1177,13 +1183,17 @@ for header, content in pseudoheaders: # if either in the canonical pseudo-headers list or in those passed on the command line if header in pseudo_list: - ph2[header] = content + if header not in REPEATABLE_PSEUDOHEADERS: + ph2[header] = content + else: + repeatable_ph += ['%s: %s' % (header, content)] else: newheaders.append((header, content)) for header in pseudo_list: if header in ph2: ph += ['%s: %s' % (header, ph2[header])] + ph.extend(repeatable_ph) return message, newheaders, ph Binary files /tmp/tmpgd4Q4O/vqFS0wSFGa/reportbug-6.6.5ubuntu1/reportbug/utils.pyc and /tmp/tmpgd4Q4O/313eDM4sZr/reportbug-6.6.6ubuntu1/reportbug/utils.pyc differ diff -Nru reportbug-6.6.5ubuntu1/test/test_utils.py reportbug-6.6.6ubuntu1/test/test_utils.py --- reportbug-6.6.5ubuntu1/test/test_utils.py 2015-09-19 03:48:26.000000000 +0000 +++ reportbug-6.6.6ubuntu1/test/test_utils.py 2016-01-02 10:14:03.000000000 +0000 @@ -429,6 +429,8 @@ Usertags: unblock Severity: normal Morph: cool +Control: testcontrol1 +Control: testcontrol2 Continuation: header @@ -448,7 +450,7 @@ Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash""" header = [u'X-Debbugs-CC: reportbug@packages.qa.debian.org'] - pseudos = ['Morph: cool'] + pseudos = ['Morph: cool', 'Control: testcontrol1', 'Control: testcontrol2'] rtype = 'debbugs' body, headers, pseudo = utils.cleanup_msg(message, header, pseudos, rtype) @@ -470,6 +472,10 @@ self.assertIn('Usertags', p) self.assertIn('Morph', p) + # bts687679, verify 2 'Control' pseudo-headers are present + for ph in pseudos: + self.assertIn(ph, pseudo) + @attr('network') # marking the test as using network def test_generate_blank_report(self): Binary files /tmp/tmpgd4Q4O/vqFS0wSFGa/reportbug-6.6.5ubuntu1/test/test_utils.pyc and /tmp/tmpgd4Q4O/313eDM4sZr/reportbug-6.6.6ubuntu1/test/test_utils.pyc differ