On Sat, Aug 23, 2014 at 00:12:35 +0200, Jakub Wilk wrote: > This is due to broken logic in bin/reportbug, around line 1428: > > src = package > # ... > package = ui.menu( > 'Which of the following packages is the bug > in?', > packages, empty_ok=True, > prompt='Select one of these packages: ') > # ... > if package != src: > # ... > elif len(packages) > 1: > issource = True > > So if you choose the same package as you chose originally on the command > line, issource will be incorrectly set to True. > I think the (untested) patch below would fix this and only set issource if the user actually selected the source package.
Cheers, Julien From: Julien Cristau <jcris...@debian.org> Date: Tue, 7 Oct 2014 18:48:32 +0200 Subject: [PATCH] Don't report bugs against "Source: binary-package" Only set issource if the user actually selected the source package; Closes: #690169 --- bin/reportbug | 4 ++-- debian/changelog | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/reportbug b/bin/reportbug index 7b04657..b2ff7cd 100755 --- a/bin/reportbug +++ b/bin/reportbug @@ -1438,6 +1438,8 @@ class UI(object): 'Which of the following packages is the bug in?', packages, empty_ok=True, prompt='Select one of these packages: ') + if package and packages[-1] == (package, 'Source package'): + issource = True else: package = packages[0][0] @@ -1448,8 +1450,6 @@ class UI(object): ewrite("Getting status for %s...\n", package) status = utils.get_package_status(package) pkgavail, installed = status[1], status[6] - elif len(packages) > 1: - issource = True else: ewrite('No matching source or binary packages.\n') diff --git a/debian/changelog b/debian/changelog index ce84a3e..4bffb2d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ reportbug (6.4.5) UNRELEASED; urgency=low + [ Sandro Tosi ] * bin/reportbug - changed to "No" the default to local MTA question in configuration mode; thanks to Hartmut Bruening for the report; Closes: #732789 @@ -18,6 +19,11 @@ reportbug (6.4.5) UNRELEASED; urgency=low - if NEW has several versions of the given package, choose the bigger; thanks to Thorsten Glaser for the report; Closes: #704040 + [ Julien Cristau ] + * bin/reportbug + - don't report bugs against "Source: binary-package": only set issource if + the user actually selected the source package; Closes: #690169 + -- Sandro Tosi <mo...@debian.org> Sun, 19 Jan 2014 20:03:17 +0100 reportbug (6.4.4) unstable; urgency=low
signature.asc
Description: Digital signature