[Reportbug-maint] Bug#650386: reportbug: reports against src:binarypackagename

Sandro Tosi morph at debian.org
Tue Oct 28 23:27:51 UTC 2014

On Sat, Oct 18, 2014 at 7:08 PM, Jakub Wilk <jwilk at debian.org> wrote:
> * Julien Cristau <jcristau at debian.org>, 2014-10-07, 18:53:
>> I think the (untested) patch below would fix this and only set issource if
>> the user actually selected the source package.

I think I will go with this patch:

diff --git a/bin/reportbug b/bin/reportbug
index e429e6c..9bfd4a1 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -1429,7 +1429,7 @@ class UI(object):
                                 pkgversion = v
                 elif len(packages) > 0:
-                    src = package
+                    src = utils.get_source_name(package)
                     if len(packages) and not notatty:
                         if src not in [x[0] for x in packages]:

I gave it some testing, but I'd be happy to hear from you for some
corner case I might have missed.

> As I told Julien on IRC, with this patch I am prompted twice to select the
> package:

which exposes a similar behaviour:

$ PYTHONPATH=. ./bin/reportbug --debug -O zlib1g
*** Welcome to reportbug.  Use ? for help at prompts. ***
Note: bug reports are publicly archived (including the email address
of the submitter).
Detected character set: UTF-8
Please change your locale if this is incorrect.

Using 'Sandro Tosi <morph at debian.org>' as your from address.
Getting status for zlib1g...
Which of the following packages is the bug in?

1 lib32z1      compression library - 32 bit runtime
2 lib32z1-dev  compression library - 32 bit development
3 lib64z1      compression library - 64 bit runtime
4 lib64z1-dev  compression library - 64 bit development
5 zlib-bin     compression library - sample programs
6 zlib1g       compression library - runtime
7 zlib1g-dbg   compression library - development
8 zlib1g-dev   compression library - development
9 zlib         Source package

Select one of these packages: 6
Getting status for zlib1g...
Which of the following installed packages is the bug in?

1 zlib1g  compression library - runtime

2 zlib1g  compression library - runtime

3 zlib1g  Uninstalled/non-existent package,

which misses the arch qualification of the packages, but I think it's
better than now. I will fix the last menu to include teh arch qualif

Cheers (and sorry for the long overdue on this bug),
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

More information about the Reportbug-maint mailing list