add-apt-repository crash when adding a ppa repository

Bug #883390 reported by Etay Meiri
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Expired
Low
Unassigned

Bug Description

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

root@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

Tags: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in software-properties (Ubuntu):
status: New → Confirmed
Revision history for this message
Andres Attemann (attemann) wrote :

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?

Revision history for this message
Andres Attemann (attemann) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Quick fix for 883390 - just skips calling apt-key if no key info received from lp" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Changed in software-properties (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Robert Roth (evfool) wrote :

Do you still experience this problem? I have tried, and I receive signing_key_fingerprints for all of the above PPAs, thus the application does not crash. So maybe it was just a Launchpad-bug, which got fixed. Just ignoring that there is no signing_key_fingerprint information associated with the PPA to add is not the best thing, as later on apt-get update may fail because there's no GPG key.
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Changed in software-properties (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Andres Attemann (attemann) wrote :

Hi Robert,

Maybe I was not clear enough. You or anyone else will have no problems with any of the repositories listed above. Only repository creator will have problems adding his own PPA and it may be so that the problem will be visible on one single machine only.

It may be related to:
* the repository being created on the same machine that was used to generate repository key??
* the repository being created while simultaneously being logged in to the launchpad with the owner account of the repository??

So steps to reproduce will be:
1) Create new launchpad account (maybe optional?)
2) Create key (maybe optional?)
2) Create new PPA
3) Upload something to the PPA and wait for build to finish (may be optional?)
4) add-apt-repository with this PPA

By the way, now at https://help.launchpad.net/Packaging/PPA I see something new:
"Launchpad generates a unique key for each PPA and uses it to sign any packages built in that PPA." - if it is some new addition then it may be related to this bug. If I recall correctly I had to create and upload a key to sign the PPA, it was not autogenerated.

Unfortunately I don't use Ubuntu anymore at the moment but if this will be of help I may restore old installation e.g. on weekend.

BR,
Andres

Robert Roth (evfool)
Changed in software-properties (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Brian Murray (brian-murray) wrote :

I tried recereating this and was unsuccessful with my PPA:

13:55:17 - flash:[...-manager/master/DistUpgrade] sudo add-apt-repository ppa:brian-murray/ppa
You are about to add the following PPA to your system:

 More info: https://launchpad.net/~brian-murray/+archive/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.6qHKye8EGr --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80/ --recv 0BA6DE0806196831530C54F0915A9DFB6AF4FEF1
gpg: requesting key 6AF4FEF1 from hkp server keyserver.ubuntu.com
gpg: key 6AF4FEF1: public key "Launchpad PPA for Brian Murray" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)

Revision history for this message
Brian Murray (brian-murray) wrote :

Switching to Incomplete as we are waiting for someone to recreate it.

Changed in software-properties (Ubuntu):
importance: Medium → Low
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for software-properties (Ubuntu) because there has been no activity for 60 days.]

Changed in software-properties (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Per Jonsson (poj) wrote :

I'm trying to add my newly created ppa, and I'm seeing this issue.

Revision history for this message
Tony Narlock (borneo) wrote :

Hi Brian,

When testing with ppa:brian-murray/ppa, I assume this wasn't a newly created PPA.

I'm getting this error on a newly created PPA on brand new packages that are not done building.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers