Are you sure that this is the complete invocation? Can you please attach a standalone reproducer?
I see how that could happen if you pass uninstalled=True (it's False by default), as that will grep Contents.gz. But with uninstalled=False it consults dpkg diversions and /var/lib/dpkg/info/*.list, which should always deliver an unique result. So if two *installed* packages ship the same file without using diversions, that is not an apport bug.
The uninstalled=True case needs fixing for this, though. It should call self._search_contents() only if the above did not already find the file, i. e move that bit to the end of the function.
Are you sure that this is the complete invocation? Can you please attach a standalone reproducer?
I see how that could happen if you pass uninstalled=True (it's False by default), as that will grep Contents.gz. But with uninstalled=False it consults dpkg diversions and /var/lib/ dpkg/info/ *.list, which should always deliver an unique result. So if two *installed* packages ship the same file without using diversions, that is not an apport bug.
The uninstalled=True case needs fixing for this, though. It should call self._search_ contents( ) only if the above did not already find the file, i. e move that bit to the end of the function.