revert changes to sources.list.d when ppa-purge fails

Bug #995113 reported by Darxus
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ppa-purge (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Had some packages installed from my ppa. I had successfully upgraded to them and purged them in the past. Attempted ppa-purge, failed. Verified that the package versions from my ppa were installed ("wayland" in version number). Tried re-adding ppa with ppa-add, then re-running ppa-purge. Same result. Looked at /etc/apt/sources.list.d/darxus-wayland-gtk-precise.list, noticed everything was commented out. WTF? Uncommented lines, re-ran ppa-purge, worked.

What commented out the lines in /etc/apt/sources.list.d/, and why didn't they get uncommented / re-added when I re-added the ppa?

$ sudo ppa-purge ppa:darxus/wayland-gtk
Updating packages lists
W: GPG error: http://deb.opera.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AAFF4A5B336064B5
PPA to be removed: darxus wayland-gtk
Warning: Could not find package list for PPA: darxus wayland-gtk

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: ppa-purge 0.2.8+bzr56
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic x86_64
ApportVersion: 2.0.1-0ubuntu5
Architecture: amd64
Date: Sat May 5 11:23:30 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64 (20120328)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ppa-purge
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Darxus (darxus) wrote :
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ppa-purge (Ubuntu):
status: New → Confirmed
Revision history for this message
Tim Lunn (darkxst) wrote :

ppa-purge disables them even when it fails, these changes should obviously be reverted on failure.

Changed in ppa-purge (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
summary: - Warning: Could not find package list for PPA: darxus wayland-gtk
+ revert changes to sources when ppa-purge fails
summary: - revert changes to sources when ppa-purge fails
+ revert changes to sources.list when ppa-purge fails
summary: - revert changes to sources.list when ppa-purge fails
+ revert changes to sources.list.d when ppa-purge fails
Revision history for this message
Jarno Suni (jarnos) wrote :

I wonder is it always desired that ppa-purge reverts changes to sources.list.d, if apt-get fails? What should it do to the packages that were successfully downgraded/purged in case apt-get failed due to some other packages (or is this a realistic case)?

What is ppa-add? I don't have it in Trusty. Why did first run of ppa-purge fail? Maybe the PPA was commented out before that for some reason?

Revision history for this message
Tim Lunn (darkxst) wrote :

If any packages fail to download apt should abort without removing any packages, so in this case yes

it should be unlikely to end up in a state were only some packages were downgraded, but if this did happen then ppa-purge is not going to be clean it up later, so in this case (if it can be distinguished from exit codes) could warn the user how to manually find and remove 'foreign' packages and leave the ppa disabled

I suspect ppa-add really meant apt-add-repository, that was in the past buggy when it came to re-enabling ppa's that had been commented out, but that should be fixed these days.

Revision history for this message
Flames_in_Paradise (ellisistfroh-deactivatedaccount) wrote :

still valid for yakkety.

In theory ppa-purge revokes than to take trust away from a ppa-repro?

tags: added: yakkety
Revision history for this message
Jarno Suni (jarnos) wrote :

Flames_in_Paradise, I do not understand your question.

I have pushed ages ago a revision that should fix this and some other bugs:
http://bazaar.launchpad.net/~jarnos/ppa-purge/apt-get/revision/64

However, the commit was not accepted due to being too big for single commit.
I have been working on another commit that is slightly different and thar has been done in git by smaller steps. Hopefully I am able to push it soon.

Anyway, you could test the revision I have already pushed.

Revision history for this message
Jarno Suni (jarnos) wrote :

You can find the git repository at https://code.launchpad.net/~jarnos/ppa-purge/+git/ppa-purge now.

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.