add-apt-repository won't uncomment a commented-out source

Bug #1160048 reported by Alan Pope 🍺🐧🐱 πŸ¦„
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Assume you're frequently testing software, so you add, remove (purge) and re-add PPAs.

sudo add-apt-repository ppa:someteam/ppa
sudo apt-get uppdate
sudo apt-get install someprogram

... time passes and you no longer need that program, or wish to test your system without it ..

sudo ppa-purge ppa:someteam/ppa

This will remove the ppa by commenting out the "deb ..." line in the sources file in /etc/apt/sources.list.d

Later, you need to do more testing of the app or some other app from the same ppa so you re-add it:-

sudo add-apt-repository ppa:someteam/ppa

However, this does _not_ add the PPA because the line/file already exists, albeit with a # in front of the "deb ...".

Some might argue that it is the fault of ppa-purge for commenting the line out. I disagree. I believe ppa-purge _should_ comment out the "deb ..." line because sometimes you want to go back to the file to remind yourself what the ppa was that you got something from, or to just manually re-enable it.

Given the single role of add-apt-repository is to add a ppa, I'd conclude it's add-apt-repository which is broken, given it doesn't add one in this common scenario.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: software-properties-common 0.92.17
ProcVersionSignature: Ubuntu 3.8.0-14.24-generic 3.8.4
Uname: Linux 3.8.0-14-generic x86_64
ApportVersion: 2.9.2-0ubuntu4
Architecture: amd64
Date: Mon Mar 25 21:39:42 2013
EcryptfsInUse: Yes
InstallationDate: Installed on 2012-06-29 (269 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MarkForUpload: True
PackageArchitecture: all
SourcePackage: software-properties
UpgradeStatus: Upgraded to raring on 2013-01-18 (66 days ago)

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :
Changed in software-properties (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Jarno Suni (jarnos) wrote :

Currently add-apt-repository also has --remove option which removes the .list file (or entry?), but does not remove/downgrade packages.

description: updated
Revision history for this message
Dan Streetman (ddstreet) wrote :

fixed when using add-apt-repository since groovy

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