apt-add-repository --remove doesn't remove as expected

Bug #888656 reported by Thomas Mashos
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
New
Undecided
Unassigned

Bug Description

When running 'apt-add-repository --remove <REPO>', the deb-src repository isn't removed along with the deb repo. Along the same lines, the message when running with the --remove option is confusing (it says it is adding a repository). This may be working as designed, but it doesn't make sense as to what someone would expect to happen.

For instance, If I run 'apt-add-repository --remove ppa:alexandr-surkov/dharma-pvr', I get a new file (/etc/apt/sources.list.d/alexandr-surkov-dharma-pvr-oneiric.list) containing

deb http://ppa.launchpad.net/alexandr-surkov/dharma-pvr/ubuntu oneiric main
deb-src http://ppa.launchpad.net/alexandr-surkov/dharma-pvr/ubuntu oneiric main

If I then run 'apt-add-repository --remove ppa:alexandr-surkov/dharma-pvr', it says it is adding a repository, and the file (/etc/apt/sources.list.d/alexandr-surkov-dharma-pvr-oneiric.list) then contains

deb-src http://ppa.launchpad.net/alexandr-surkov/dharma-pvr/ubuntu oneiric main

I would expect it to remove both repositories (deb and deb-src) when running it with the --remove command since it added both when running it regularly

thomas@earth:~/code$ sudo apt-add-repository --remove ppa:alexandr-surkov/dharma-pvr
You are about to add the following PPA to your system:
 dharma-pvr

 More info: https://launchpad.net/~alexandr-surkov/+archive/dharma-pvr
Press [ENTER] to continue or ctrl-c to cancel adding it

thomas@earth:~/code$ ls -l /etc/apt/sources.list.d/
total 32
-rw-r--r-- 1 root root 80 2011-11-10 09:51 alexandr-surkov-dharma-pvr-oneiric.list
-rw-r--r-- 1 root root 156 2011-11-10 09:51 alexandr-surkov-dharma-pvr-oneiric.list.save
-rw-r--r-- 1 root root 49 2011-11-10 09:51 dropbox.list
-rw-r--r-- 1 root root 49 2011-11-10 09:51 dropbox.list.save
-rw-r--r-- 1 root root 160 2011-11-10 09:51 stebbins-handbrake-snapshots-oneiric.list
-rw-r--r-- 1 root root 160 2011-11-10 09:51 stebbins-handbrake-snapshots-oneiric.list.save
-rw-r--r-- 1 root root 67 2011-11-10 09:51 virtualbox.list
-rw-r--r-- 1 root root 67 2011-11-10 09:51 virtualbox.list.save
thomas@earth:~/code$ cat /etc/apt/sources.list.d/alexandr-surkov-dharma-pvr-oneiric.list
deb-src http://ppa.launchpad.net/alexandr-surkov/dharma-pvr/ubuntu oneiric main

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: apt 0.8.16~exp5ubuntu13
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Thu Nov 10 09:52:16 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110915.1)
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Thomas Mashos (tgm4883) wrote :
Revision history for this message
Jason Conti (jconti) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug #838507, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.

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.