diff -Nru apport-2.20.10/apport/ui.py apport-2.20.10/apport/ui.py --- apport-2.20.10/apport/ui.py 2018-10-11 18:49:41.000000000 +0000 +++ apport-2.20.10/apport/ui.py 2018-10-24 22:11:57.000000000 +0000 @@ -828,10 +828,21 @@ # executable? elif '/' in self.args[0]: - pkg = apport.packaging.get_file_package(self.args[0]) - if not pkg: - optparser.error('%s does not belong to a package.' % self.args[0]) + if self.args[0].startswith('/snap/bin'): + # see if the snap has the same name as the executable + snap = find_snap(self.args[0].split('/')[-1]) + if not snap: + optparser.error('%s is provided by a snap. No contact address has been provided; visit the forum at https://forum.snapcraft.io/ for help.' % self.args[0]) + elif snap.get("contact", ""): + optparser.error('%s is provided by a snap published by %s. Contact them via %s for help.' % (self.args[0], snap["developer"], snap["contact"])) + else: + optparser.error('%s is provided by a snap published by %s. No contact address has been provided; visit the forum at https://forum.snapcraft.io/ for help.' % (self.args[0], snap["developer"])) sys.exit(1) + else: + pkg = apport.packaging.get_file_package(self.args[0]) + if not pkg: + optparser.error('%s does not belong to a package.' % self.args[0]) + sys.exit(1) self.args = [] self.options.filebug = True self.options.package = pkg diff -Nru apport-2.20.10/debian/changelog apport-2.20.10/debian/changelog --- apport-2.20.10/debian/changelog 2018-10-11 21:35:11.000000000 +0000 +++ apport-2.20.10/debian/changelog 2018-11-01 16:30:11.000000000 +0000 @@ -1,3 +1,10 @@ +apport (2.20.10-0ubuntu14) disco; urgency=medium + + * apport/ui.py: when using ubuntu-bug properly handle executables which + start with /snap/bin. (LP: #1760220) + + -- Brian Murray Thu, 01 Nov 2018 09:30:11 -0700 + apport (2.20.10-0ubuntu13) cosmic; urgency=medium * Fix PEP8 605 warnings and ignore 503,504 ones.