This also works as intended on Ubuntu 18.04.

bdmurray@clean-bionic-amd64:~$ ubuntu-bug /snap/bin/juju
Usage: ubuntu-bug [options] [symptom|pid|package|program path|.apport/.crash 
file]

ubuntu-bug: error: /snap/bin/juju does not belong to a package.
bdmurray@clean-bionic-amd64:~$ sudo apt install apport-gtk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  python3-apport
The following packages will be upgraded:
  apport-gtk python3-apport
2 upgraded, 0 newly installed, 0 to remove and 270 not upgraded.
Need to get 91.4 kB of archives.
After this operation, 6,144 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 
python3-apport all 2.20.9-0ubuntu7.5 [81.6 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 apport-gtk 
all 2.20.9-0ubuntu7.5 [9,704 B]
Fetched 91.4 kB in 1s (98.0 kB/s)
(Reading database ... 166001 files and directories currently installed.)
Preparing to unpack .../python3-apport_2.20.9-0ubuntu7.5_all.deb ...
Unpacking python3-apport (2.20.9-0ubuntu7.5) over (2.20.9-0ubuntu7.2) ...
Preparing to unpack .../apport-gtk_2.20.9-0ubuntu7.5_all.deb ...
Unpacking apport-gtk (2.20.9-0ubuntu7.5) over (2.20.9-0ubuntu7.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.1) ...
Setting up python3-apport (2.20.9-0ubuntu7.5) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Setting up apport-gtk (2.20.9-0ubuntu7.5) ...
bdmurray@clean-bionic-amd64:~$ ubuntu-bug /snap/bin/juju
Usage: ubuntu-bug [options] [symptom|pid|package|program path|.apport/.crash 
file]

ubuntu-bug: error: /snap/bin/juju is provided by a snap. No contact
address has been provided; visit the forum at
https://forum.snapcraft.io/ for help.

** Tags removed: verification-needed-bionic
** Tags added: verification-done-bionic

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to apport in Ubuntu.
https://bugs.launchpad.net/bugs/1760220

Title:
  ubuntu-bug with program path says as a snap does not belong to a
  package

Status in apport package in Ubuntu:
  Fix Released
Status in apport source package in Bionic:
  Fix Committed
Status in apport source package in Cosmic:
  Fix Committed

Bug description:
  [Impact]
  ubuntu-bug responds with a misleading statement asked to report a bug about 
an executable path which starts with /snap/bin and the response is different 
than if you were to use the snap name e.g. ubuntu-bug juju

  [Test Case]
  1) Run ubuntu-bug /snap/bin/juju
  2) Read "/snap/bin/juju does not belong to a package"

  With the version of apport in -proposed you'll receive a more
  informative message about where you might get help regarding the issue
  you are experiencing.

  [Regression Potential]
  The new code only affects executables that start with '/snap/bin' so the only 
danger is if the newly added code contains an error which would cause a 
traceback.

  Original Report
  ---------------
  apport's ui.py file contains the following code:

   809         # executable?
   810         elif '/' in self.args[0]:
   811             pkg = apport.packaging.get_file_package(self.args[0])
   812             if not pkg:
   813                 optparser.error('%s does not belong to a package.' % 
self.args[0])
   814                 sys.exit(1)
   815             self.args = []
   816             self.options.filebug = True
   817             self.options.package = pkg

  This will not provide any useful information about what to do if the
  'executable' is provided by a snap. Information similar to
  https://code.launchpad.net/~juliank/ubuntu/bionic/apport/snap/+merge/342207
  should be provided if the path is from a snap.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1760220/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to