Ubuntu

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

Reported by Bernd Schlapsi on 2009-10-08
80
This bug affects 15 people
Affects Status Importance Assigned to Milestone
Software Properties
New
Undecided
Unassigned
software-properties (Ubuntu)
Wishlist
Unassigned
Nominated for Lucid by Vistaus

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

Bernd Schlapsi (bernd-sch) wrote :
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

Bernd Schlapsi (bernd-sch) wrote :

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

Changed in software-properties (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
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/

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"

Vistaus (djmusic121) wrote :

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

Changed in software-properties (Ubuntu):
status: Triaged → Confirmed
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
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.

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.

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..

mac9416 (mac9416) wrote :

Done. Thanks, Philip!

tags: added: patch-forwarded-upstream
removed: patch-needswork
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
david6 (andrew-dowden) wrote :

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

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  Edit
Everyone can see this information.

Other bug subscribers