Comment 0 for bug 1684117

Revision history for this message
Benjamin Drung (bdrung) wrote : apport-retrace determines wrong package providing a file

Assume that you have two packages foo1 and foo2 which provide the binary /usr/bin/foo.

make_sandbox() calls

            pkg = apport.packaging.get_file_package(report[path], True, pkgmap_cache_dir,
                                                    release=report['DistroRelease'],
                                                    arch=report.get('Architecture'))

In this example, report[path] would point to /usr/bin/foo. get_file_package() will return the first package name that it finds. So it might either return foo1 or foo2 which might be the wrong one. get_file_package() should take into account which package is installed instead.