[Bug 883390] Re: add-apt-repository crash when adding a ppa repository

Andres Attemann 883390 at bugs.launchpad.net
Fri Dec 9 20:38:57 UTC 2011


Confirm, reproduced with my own test repository.
Don't know how launchpad does it but get_ppa_info_from_lp returns empty "signing_key_fingerprint" field.
If i get the page with the browser result is also empty "signing_key_fingerprint":
https://launchpad.net/api/1.0/~{myname}/+archive/{myppa}

So maybe something along these lines will do?

--- ppa.py.org	2011-12-09 22:31:10.755569329 +0200
+++ ppa.py	2011-12-09 22:30:38.475568407 +0200
@@ -94,10 +94,12 @@
         except IndexError as e:
             print "Error: can't find signing_key_fingerprint at %s" % lp_url
             return False
-        res = subprocess.call(
-            ["apt-key", "adv", 
-             "--keyserver", self.keyserver,
-             "--recv", signing_key_fingerprint])
+        res = 0
+        if signing_key_fingerprint:
+            res = subprocess.call(
+                ["apt-key", "adv", 
+                 "--keyserver", self.keyserver,
+                 "--recv", signing_key_fingerprint])
         return (res == 0)


Or should this bug be marked as affecting launchpad itself as problem looks to be on the server side api?

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

Title:
  add-apt-repository crash when adding a ppa repository

Status in “software-properties” package in Ubuntu:
  Confirmed

Bug description:
  add-apt-repository crashes when I add my ppa repository:

  root at ubuntu:/home/cl# add-apt-repository ppa:etay-meiri/ppa
  You are about to add the following PPA to your system:
   Etay Meiri's PPA
   
   More info: https://launchpad.net/~etay-meiri/+archive/ppa
  Press [ENTER] to continue or ctrl-c to cancel adding it

  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 78, in run
      self.add_ppa_signing_key(self.ppa_path)
    File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 100, in add_ppa_signing_key
      "--recv", signing_key_fingerprint])
    File "/usr/lib/python2.7/subprocess.py", line 493, in call
      return Popen(*popenargs, **kwargs).wait()
    File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
      errread, errwrite)
    File "/usr/lib/python2.7/subprocess.py", line 1239, in _execute_child
      raise child_exception
  TypeError: execv() arg 2 must contain only strings

  Package infomation:
  python-software-properties version 0.81.10

  Release information:
  Description:	Ubuntu 11.10
  Release:	11.10

  How to reproduce: 
  execute the following:

  add-apt-repository ppa:etay-meiri/ppa

  Expected behavior: command should succeed.

  Thanks,

  Etay Meiri

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




More information about the foundations-bugs mailing list