This specific case appears to have been fixed a while ago. I couldn't
find the specific commit, but running this test case in 20.04, an error
is printed in the terminal, but no exception is raised.

** Changed in: software-properties (Ubuntu)
       Status: Confirmed => Fix Released

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

Title:
  add-apt-repository does not handle malformed repo URL nicely

Status in software-properties package in Ubuntu:
  Fix Released

Bug description:
  add-apt-repository doesn't handle URLs nicely when they are malformed
  in a particular way. If you forget to add a repository name to a full-
  form ppa url it should fail gracefully but instead crashes:

  sudo add-apt-repository http://ppa.launchpad.net/username/ubuntu
  Exception in thread Thread-1:
  Traceback (most recent call last):
    File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
      self.run()
    File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 95, 
in run
      self.add_ppa_signing_key(self.ppa_path)
    File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 
103, in add_ppa_signing_key
      owner_name, ppa_name, distro = ppa_path[1:].split('/')
  ValueError: need more than 2 values to unpack

  In this case I simply forgot to add the ppa name between the owner
  name and the distro. The 'correct' lines for the malformed URL are
  added to sources.list. It would be much nicer if add-apt-repository
  could handle this issue more gracefully. This is on Ubuntu 11.10,
  version 0.81.13.3.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/953424/+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