add-apt-repository should have an option to remove ppa from sources.list

Bug #446216 reported by Bernd Schlapsi
102
This bug affects 19 people
Affects Status Importance Assigned to Milestone
Software Properties
New
Undecided
Unassigned
software-properties (Ubuntu)
Fix Released
Wishlist
Unassigned
Nominated for Lucid by Heimen Stoffels

Bug Description

With the "Software Sources" GUI it's possible to delete an configured ppa entry. But there is no possibility to delete a ppa with the add-apt-repository command. A new option would be nice:
sudo add-apt-repository --remove ppa:xxxxxxx

ProblemType: Bug
Architecture: i386
Date: Thu Oct 8 12:36:17 2009
DistroRelease: Ubuntu 9.10
Package: python-software-properties 0.75.4
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-12.41-generic
SourcePackage: software-properties
Uname: Linux 2.6.31-12-generic i686

Revision history for this message
Bernd Schlapsi (bernd-sch) wrote :
Revision history for this message
Bernd Schlapsi (bernd-sch) wrote :

the script add-apt-repository uses the python package "softwareproperties. And there is the class method "SoftwareProperties.remove_source".

So far as I understand the source-code, the functionality is in the used library but not in the "add-apt-repository" script

Revision history for this message
Bernd Schlapsi (bernd-sch) wrote :

I wrote a "add-apt-repository" version which supports a --remove option

Revision history for this message
Bernd Schlapsi (bernd-sch) wrote :
Changed in software-properties (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Alessandro Lanave (ingalex) wrote :

I've realized a script to remove ppa repository launchpad added with add-apt-repository.
sintax: sudo remove-apt-repository <repository_name>/<eventual_subdirectory>

You can find it here: http://www.sourceslist.eu/guide/script-remove-apt-repository/

Revision history for this message
Narcis Garcia (narcisgarcia) wrote :

Another nice option could be a friendly description to be seen in the GUI:

sudo add-apt-repository ppa:xxxxx "This aplication"

Revision history for this message
Heimen Stoffels (vistaus) wrote :

I can confirm this bug. Will it be fixed when 10.04 comes out?

Changed in software-properties (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
mac9416 (mac9416) wrote :

Hi, Bernd,

When I run 'patch < diff.txt' in the python-software-properties source directory, patch throws this error: "patch: **** Only garbage was found in the patch input."

Looking at your diff file, it doesn't look like others I've seen. What do you think the problem could be?

tags: added: patch-needswork
Revision history for this message
mac9416 (mac9416) wrote :

Here is an updated patch for Software Properties 0.75.10. I haven't had a chance to test it thoroughly, but I will.

Revision history for this message
mac9416 (mac9416) wrote :

I tested the patch, and everything seems to work fine. I've submitted a merge request here: https://code.launchpad.net/~mac9416/software-properties/add-apt-repo-remove-opt/+merge/30094

I'm not sure if I should change the patch-needswork tag to patch-forwarded-upstream or not since, as someone put it in #ubuntu-reviews, "we are our own upstream". Perhaps one of the Powers That Be can clear that up.

Revision history for this message
Philip Muškovac (yofel) wrote :

Linked the branch with the bug.
@mac9416: Please change the tag, a different project on Launchpad counts as upstream. I was confused there for a moment..

Revision history for this message
mac9416 (mac9416) wrote :

Done. Thanks, Philip!

tags: added: patch-forwarded-upstream
removed: patch-needswork
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
software-properties (0.76) maverick; urgency=low

  [ Jonathan Harker ]
  * Improve documentation for apt-add-repository (LP: #586790)

  [ mac9416 ]
  * Fixed bug LP: #446216: added --remove option to add-apt-reporitory.
  * Fixed Bug LP: #579669 which points out that add-apt-repository will
    create a sources.list.d file with illegal characters
    if there are illegal characters in a PPA name

  [ Andrea Corbellini ]
  * Automatically create a deb-src line when adding a new repository
    (LP: 399711)

  [ Michael Vogt ]
  * add test for LP: #579669 and use re.sub() instead of urllib.quote()
  * merged lp:~alexzak/software-properties/fixes, many thanks

  [ Erik B. Andersen ]
  * Fixed depreciation warnings

  [ Brandon Tomlinson ]
  * Altered data/glade/main.glade Put the bottom buttons in a button box
    to make the buttons assume the correct width (LP: #515990)
 -- Michael Vogt <email address hidden> Fri, 13 Aug 2010 17:38:45 +0200

Changed in software-properties (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
david6 (andrew-dowden) wrote :

NOTE: Erroneously prompts with '.. about to ADD the following ..', which you can safely ignore.

Revision history for this message
John Doe (johndoe32102002) wrote :

Still not fixed... the PPAs are not in the sources.list or anywhere where a user can remove them

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.