add-apt-repository doesn't add ppa if file with comments exists

Bug #1037916 reported by Javier Collado
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

add-apt-repository fails to add a ppa if the file for the ppa already exists with the deb entries commented out. Besides this, it doesn't print any error message and returns success (0).

One way to reproduce it is as follows:
- Add PPA to sources
$ sudo add-apt-repository -y ppa:javier.collado/ppa

$ cat /etc/apt/sources.list.d/javier_collado-ppa-quantal.list
deb http://ppa.launchpad.net/javier.collado/ppa/ubuntu quantal main
deb-src http://ppa.launchpad.net/javier.collado/ppa/ubuntu quantal main

- Remove PPA from sources
$ sudo ppa-purge ppa:javier.collado/ppa

$ cat /etc/apt/sources.list.d/javier_collado-ppa-quantal.list
# deb http://ppa.launchpad.net/javier.collado/ppa/ubuntu quantal main
# deb-src http://ppa.launchpad.net/javier.collado/ppa/ubuntu quantal main

- Add again PPA to sources
$ sudo add-apt-repository -y ppa:javier.collado/ppa
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.Kekxq78ff1 --trustdb-name /etc/apt//trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80/ --recv 36AA079422DB186A78174271FFD1BF24CF31078F
gpg: requesting key CF31078F from hkp server keyserver.ubuntu.com
gpg: key CF31078F: "Launchpad PPA for Javier Collado" not changed
gpg: Total number processed: 1
gpg: unchanged: 1

- PPA wasn't really added
$ cat /etc/apt/sources.list.d/javier_collado-ppa-quantal.list
# deb http://ppa.launchpad.net/javier.collado/ppa/ubuntu quantal main
# deb-src http://ppa.launchpad.net/javier.collado/ppa/ubuntu quantal main

Related branches

Changed in software-properties (Ubuntu):
importance: Undecided → Medium
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
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.92.5

---------------
software-properties (0.92.5) quantal; urgency=low

  [ Colin Watson ]
  * add-apt-repository:
    - Force output encoding to UTF-8 even in non-UTF-8 locales
      (LP: #1041431).

  [ sampo555 ]
  * Construct the path of a PPA source file properly (LP: #972617, #994515,
    #1018327, #1037916).
 -- Colin Watson <email address hidden> Mon, 17 Sep 2012 14:41:12 +0100

Changed in software-properties (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.