Public bug reported:

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.

** Affects: software-properties (Ubuntu)
     Importance: Low
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/953424

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/953424/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to