[mantic] ppa-purge no longer purges what add-apt-repository adds

Bug #2036761 reported by Jeremy Bícha
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ppa-purge (Ubuntu)
Status tracked in Mantic
Mantic
Triaged
High
Unassigned
software-properties (Ubuntu)
Status tracked in Mantic
Mantic
Confirmed
Undecided
Unassigned

Bug Description

Test Case
---------
From Ubuntu 23.10:

sudo apt install hello
sudo add-apt-repository ppa:jbicha/temp
sudo apt upgrade

apt policy hello

sudo ppa-purge ppa:jbicha/temp

apt policy hello
reveals that the PPA version of hello is still installed

Also /etc/apt/sources.list.d/jbicha-ubuntu-temp-mantic.sources
is still present and active

What Should Happen
------------------
ppa-purge should disable the PPA and reinstall any PPA packages with the version apt currently sees.

Background
----------
add-apt-repository creates deb822 sources lists, starting in Ubuntu 23.10

https://discourse.ubuntu.com/t/spec-apt-deb822-sources-by-default/29333

Other Info
----------
add-apt-repository has a --remove option

But it does not do the reinstall part which is important
Honestly, that feature is so important, I suggest that add-apt-repository take over the functionality of ppa-purge so that we always get the ppa-purge behavior

Revision history for this message
Julian Andres Klode (juliank) wrote :

ppa-purge is a pretty dangerous script to run due to the downgrade functionality that we should be discouraging use of.

It can create systems that look like they have supported components only but had everything messed up by downgrading from some PPA.

If the PPA added packages not available in other sources, removing them is fine. But if downgrades are involved it should come with reasonably strong warnings.

Generally speaking people should probably reinstall from scratch if they added a PPA that replaced important system packages.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Adding a task for sodtware-properties as I think this may be easier to implement there than fix the script, and because we also generally are going to need an owner such that the incoming tag does something - ppa-purge is a pretty hacky universe script

Revision history for this message
Jeremy Bícha (jbicha) wrote :

ppa-purge seems less dangerous to me than removing a PPA and therefore having every package that was in the PPA be unsupportable until eventually a newer version appears (probably after upgrading to a new Ubuntu series).

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in software-properties (Ubuntu):
status: New → Confirmed
tags: added: foundations-todo
removed: rls-mm-incoming
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.