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

Bug #2036761 reported by Jeremy Bícha
50
This bug affects 7 people
Affects Status Importance Assigned to Milestone
ppa-purge (Ubuntu)
Fix Released
High
Ghadi Rahme
Mantic
Fix Committed
High
Ghadi Rahme
Noble
Fix Released
High
Ghadi Rahme
software-properties (Ubuntu)
Invalid
Undecided
Unassigned
Mantic
Invalid
Undecided
Unassigned
Noble
Invalid
Undecided
Unassigned

Bug Description

Thank you @jbicha for the original bug report!

[ Impact ]

Currently ppa-purge fails to purge packages on distribution using the deb822 source format. Currently mantic and noble make use of this format and are affected by this issue.
When running ppa-purge to remove a custom PPA, ppa-purge fails to disable the custom PPA since it cannot disable deb822 sources and leads to apt still querying the ppa when running:

$ apt update

In older versions of ubuntu, PPAs used the ".list" format which could be disabled by simply commenting out the "deb" line with a "#". This was the method that ppa-purge used to disable PPAs.
This new patch allows ppa-purge to detect and disable deb822 source files by adding an "Enabled: no" field in each component section of the deb822 file. It also removes any line that starts with "Enabled:"
to make sure the resulting file is clean.

[ Test Plan ]

The changes were tested on both mantic and noble in a lxc container using the oibaf mesa PPA (https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers) as the test PPA.
The following steps were recorded in a noble lxc container.

 - First make sure that mesa-utils is installed in your environment:
    $ sudo apt update && sudo apt install mesa-utils

 - Add the oibaf PPA to your system using the following command:
    $ sudo add-apt-repository ppa:oibaf/graphics-drivers

 - Make sure that the mesa-utils packages were upgraded after adding the PPA:
    $ sudo apt update && sudo apt upgrade
    $ dpkg - l | grep mesa

 - output should be similar to the following:

    ii libegl-mesa0:amd64 24.1~git2402280600.41722c~oibaf~n amd64 free implementation of the EGL API -- Mesa vendor library
    ii libgl1-mesa-dri:amd64 24.1~git2402280600.41722c~oibaf~n amd64 free implementation of the OpenGL API -- DRI modules
    ii libglapi-mesa:amd64 24.1~git2402280600.41722c~oibaf~n amd64 free implementation of the GL API -- shared library
    ii libglx-mesa0:amd64 24.1~git2402280600.41722c~oibaf~n amd64 free implementation of the OpenGL API -- GLX vendor library
    ii mesa-utils 9.0.0-2 amd64 Miscellaneous Mesa utilities -- symlinks
    ii mesa-utils-bin:amd64 9.0.0-2 amd64 Miscellaneous Mesa utilities -- native applications
    ii mesa-vulkan-drivers:amd64 24.1~git2402280600.41722c~oibaf~n amd64 Mesa Vulkan graphics drivers

 - Install and run ppa-purge:
    $ sudo apt install ppa-purge
    $ sudo ppa-purge ppa:oibaf/graphics-drivers

 - ppa-purge will report at the end that none of the oibaf packages need to be downgraded/removed:

    ....
    libglapi-mesa is already the newest version (24.1~git2402280600.41722c~oibaf~n).
    libglapi-mesa set to manually installed.
    libglx-mesa0 is already the newest version (24.1~git2402280600.41722c~oibaf~n).
    libglx-mesa0 set to manually installed.
    mesa-vulkan-drivers is already the newest version (24.1~git2402280600.41722c~oibaf~n).
    mesa-vulkan-drivers set to manually installed.
    Selected version '2.4.120+git2402271331.1b4e04~oibaf~n' (Updated Open Graphics Drivers - since 2011!:24.04/noble [amd64]) for 'libdrm-amdgpu1'
    Selected version '2.4.120+git2402271331.1b4e04~oibaf~n' (Updated Open Graphics Drivers - since 2011!:24.04/noble [all]) for 'libdrm-common'
    Selected version '2.4.120+git2402271331.1b4e04~oibaf~n' (Updated Open Graphics Drivers - since 2011!:24.04/noble [amd64]) for 'libdrm-intel1'
    Selected version '2.4.120+git2402271331.1b4e04~oibaf~n' (Updated Open Graphics Drivers - since 2011!:24.04/noble [amd64]) for 'libdrm-nouveau2'
    Selected version '2.4.120+git2402271331.1b4e04~oibaf~n' (Updated Open Graphics Drivers - since 2011!:24.04/noble [amd64]) for 'libdrm-radeon1'
    Selected version '2.4.120+git2402271331.1b4e04~oibaf~n' (Updated Open Graphics Drivers - since 2011!:24.04/noble [amd64]) for 'libdrm2'
    Selected version '24.1~git2402280600.41722c~oibaf~n' (Updated Open Graphics Drivers - since 2011!:24.04/noble [amd64]) for 'libegl-mesa0'
    Selected version '24.1~git2402280600.41722c~oibaf~n' (Updated Open Graphics Drivers - since 2011!:24.04/noble [amd64]) for 'libgbm1'
    Selected version '24.1~git2402280600.41722c~oibaf~n' (Updated Open Graphics Drivers - since 2011!:24.04/noble [amd64]) for 'libgl1-mesa-dri'
    Selected version '24.1~git2402280600.41722c~oibaf~n' (Updated Open Graphics Drivers - since 2011!:24.04/noble [amd64]) for 'libglapi-mesa'
    Selected version '24.1~git2402280600.41722c~oibaf~n' (Updated Open Graphics Drivers - since 2011!:24.04/noble [amd64]) for 'libglx-mesa0'
    Selected version '24.1~git2402280600.41722c~oibaf~n' (Updated Open Graphics Drivers - since 2011!:24.04/noble [amd64]) for 'mesa-vulkan-drivers'
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    PPA purged successfully

- And indeed none got modified:
    $ dpkg -l | grep mesa

    ii libegl-mesa0:amd64 24.1~git2402280600.41722c~oibaf~n amd64 free implementation of the EGL API -- Mesa vendor library
    ii libgl1-mesa-dri:amd64 24.1~git2402280600.41722c~oibaf~n amd64 free implementation of the OpenGL API -- DRI modules
    ii libglapi-mesa:amd64 24.1~git2402280600.41722c~oibaf~n amd64 free implementation of the GL API -- shared library
    ii libglx-mesa0:amd64 24.1~git2402280600.41722c~oibaf~n amd64 free implementation of the OpenGL API -- GLX vendor library
    ii mesa-utils 9.0.0-2 amd64 Miscellaneous Mesa utilities -- symlinks
    ii mesa-utils-bin:amd64 9.0.0-2 amd64 Miscellaneous Mesa utilities -- native applications
    ii mesa-vulkan-drivers:amd64 24.1~git2402280600.41722c~oibaf~n amd64 Mesa Vulkan graphics drivers

- After installing the new ppa-purge deb:
    $ dpkg -l | grep ppa-purge
    ii ppa-purge 0.2.8+bzr63-0ubuntu2 all disables a PPA and reverts to official packages

- Runnin ppa-purge again
    $ sudo ppa-purge ppa:oibaf/graphics-drivers

- We can see the following output:

    Updating packages lists
    PPA to be removed: oibaf graphics-drivers
    Package revert list generated:
    libdrm-amdgpu1:amd64/noble libdrm-common/noble libdrm-intel1:amd64/noble libdrm-nouveau2:amd64/noble libdrm-radeon1:amd64/noble libdrm2:amd64/noble
    libegl-mesa0:amd64/noble libgbm1:amd64/noble libgl1-mesa-dri:amd64/noble libglapi-mesa:amd64/noble libglx-mesa0:amd64/noble mesa-vulkan-drivers:amd64/noble

    Updating packages lists
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Selected version '2.4.120-2' (Ubuntu:24.04/noble [amd64]) for 'libdrm-amdgpu1'
    Selected version '2.4.120-2' (Ubuntu:24.04/noble [all]) for 'libdrm-common'
    Selected version '2.4.120-2' (Ubuntu:24.04/noble [amd64]) for 'libdrm-intel1'
    Selected version '2.4.120-2' (Ubuntu:24.04/noble [amd64]) for 'libdrm-nouveau2'
    Selected version '2.4.120-2' (Ubuntu:24.04/noble [amd64]) for 'libdrm-radeon1'
    Selected version '2.4.120-2' (Ubuntu:24.04/noble [amd64]) for 'libdrm2'
    Selected version '24.0.1-1ubuntu1' (Ubuntu:24.04/noble [amd64]) for 'libegl-mesa0'
    Selected version '24.0.1-1ubuntu1' (Ubuntu:24.04/noble [amd64]) for 'libgbm1'
    Selected version '24.0.1-1ubuntu1' (Ubuntu:24.04/noble [amd64]) for 'libgl1-mesa-dri'
    Selected version '24.0.1-1ubuntu1' (Ubuntu:24.04/noble [amd64]) for 'libglapi-mesa'
    Selected version '24.0.1-1ubuntu1' (Ubuntu:24.04/noble [amd64]) for 'libglx-mesa0'
    Selected version '24.0.1-1ubuntu1' (Ubuntu:24.04/noble [amd64]) for 'mesa-vulkan-drivers'
    The following packages will be DOWNGRADED:
    libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libegl-mesa0 libgbm1 libgl1-mesa-dri libglapi-mesa libglx-mesa0
    mesa-vulkan-drivers
    0 upgraded, 0 newly installed, 12 downgraded, 0 to remove and 0 not upgraded.
    Need to get 0 B/20.5 MB of archives.
    After this operation, 36.1 MB disk space will be freed.
    Do you want to continue? [Y/n]

- After downgrading the packages:
    $ dpkg -l | grep mesa

    ii libegl-mesa0:amd64 24.0.1-1ubuntu1 amd64 free implementation of the EGL API -- Mesa vendor library
    ii libgl1-mesa-dri:amd64 24.0.1-1ubuntu1 amd64 free implementation of the OpenGL API -- DRI modules
    ii libglapi-mesa:amd64 24.0.1-1ubuntu1 amd64 free implementation of the GL API -- shared library
    ii libglx-mesa0:amd64 24.0.1-1ubuntu1 amd64 free implementation of the OpenGL API -- GLX vendor library
    ii mesa-utils 9.0.0-2 amd64 Miscellaneous Mesa utilities -- symlinks
    ii mesa-utils-bin:amd64 9.0.0-2 amd64 Miscellaneous Mesa utilities -- native applications
    ii mesa-vulkan-drivers:amd64 24.0.1-1ubuntu1 amd64 Mesa Vulkan graphics drivers

- This confirms that the packages were indeed downgraded. We can also check from the sources file that it was indeed disabled with "Enabled: no":
    $ cat /etc/apt/sources.list.d/oibaf-ubuntu-graphics-drivers-noble.sources

    Types: deb
    URIs: https://ppa.launchpadcontent.net/oibaf/graphics-drivers/ubuntu/
    Suites: noble
    Components: main
    Enabled: no
    Signed-By:
    -----BEGIN PGP PUBLIC KEY BLOCK-----
    ...

- Running sudo apt update also shows that the oibaf PPA URL is not being queried:

    root@build-noble:~# sudo apt update
    Hit:1 http://security.ubuntu.com/ubuntu noble-security InRelease
    Hit:2 http://archive.ubuntu.com/ubuntu noble InRelease
    Hit:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease
    Hit:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    All packages are up to date.

[ Where problems could occur ]
- Patch could fail to disable the PPA if an "Enabled: yes" entry was not detected and removed or if no Components line was found. This would cause ppa-purge to fails again in the same manner it is currently failing.
- The patch could also fail to detect the file in its entirety if the file name does not end with ".sources" or if its name does not follow the pattern $PPAOWNER/$PPANAME

[Original 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
Revision history for this message
Norbert (nrbrtx) wrote :
Download full text (7.4 KiB)

Below commands does nothing on freshly installed Ubuntu MATE 23.10, but worked for years before.

```
sudo add-apt-repository ppa:nrbrtx/xorg-hotkeys
...
sudo apt-get dist-upgrade
...
$ apt-cache policy $(dpkg -l | grep ppa1 | awk '{print $2}')
xserver-common:
  Installed: 2:21.1.7-3ubuntu2.2ppa1
  Candidate: 2:21.1.7-3ubuntu2.2ppa1
  Version table:
 *** 2:21.1.7-3ubuntu2.2ppa1 500
        500 https://ppa.launchpadcontent.net/nrbrtx/xorg-hotkeys/ubuntu mantic/main amd64 Packages
        500 https://ppa.launchpadcontent.net/nrbrtx/xorg-hotkeys/ubuntu mantic/main i386 Packages
        100 /var/lib/dpkg/status
     2:21.1.7-3ubuntu2.1 500
        500 http://archive.ubuntu.com/ubuntu mantic-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu mantic-updates/main i386 Packages
        500 http://security.ubuntu.com/ubuntu mantic-security/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu mantic-security/main i386 Packages
     2:21.1.7-3ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu mantic/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu mantic/main i386 Packages
xserver-xorg-core:
  Installed: 2:21.1.7-3ubuntu2.2ppa1
  Candidate: 2:21.1.7-3ubuntu2.2ppa1
  Version table:
 *** 2:21.1.7-3ubuntu2.2ppa1 500
        500 https://ppa.launchpadcontent.net/nrbrtx/xorg-hotkeys/ubuntu mantic/main amd64 Packages
        100 /var/lib/dpkg/status
     2:21.1.7-3ubuntu2.1 500
        500 http://archive.ubuntu.com/ubuntu mantic-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu mantic-security/main amd64 Packages
     2:21.1.7-3ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu mantic/main amd64 Packages
xserver-xorg-legacy:
  Installed: 2:21.1.7-3ubuntu2.2ppa1
  Candidate: 2:21.1.7-3ubuntu2.2ppa1
  Version table:
 *** 2:21.1.7-3ubuntu2.2ppa1 500
        500 https://ppa.launchpadcontent.net/nrbrtx/xorg-hotkeys/ubuntu mantic/main amd64 Packages
        100 /var/lib/dpkg/status
     2:21.1.7-3ubuntu2.1 500
        500 http://archive.ubuntu.com/ubuntu mantic-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu mantic-security/main amd64 Packages
     2:21.1.7-3ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu mantic/main amd64 Packages
...
sudo apt-get install ppa-purge

$ sudo ppa-purge ppa:nrbrtx/xorg-hotkeys
Updating packages lists
PPA to be removed: nrbrtx xorg-hotkeys
Package revert list generated:
 xserver-common/mantic xserver-xorg-core/mantic xserver-xorg-legacy/mantic

Updating packages lists
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
xserver-common is already the newest version (2:21.1.7-3ubuntu2.2ppa1).
xserver-xorg-core is already the newest version (2:21.1.7-3ubuntu2.2ppa1).
xserver-xorg-legacy is already the newest version (2:21.1.7-3ubuntu2.2ppa1).
Selected version '2:21.1.7-3ubuntu2.2ppa1' (PPA with patched xserver-xorg to fix bug 865:23.10/mantic [all]) for 'xserver-common'
Selected version '2:21.1.7-3ubuntu2.2ppa1' (PPA with patched xserver-xorg to fix bug 865:23.10/mantic [amd64]) for 'xserver-xorg-core'
Selected version '2:21.1.7-3ubuntu2.2ppa1' (PPA with patched xserver-xorg ...

Read more...

Revision history for this message
Nicolás Abel Carbone (nicocarbone) wrote :

I am having the same problem.
Previously working functionality shouldn't be removed without an alternative.

Is there any known workaround? How can I downgrade packages without ppa-purge?

Norbert (nrbrtx)
tags: added: noble
Revision history for this message
windblow (agtx) wrote :

I've used the following workaround:

- created old style <ppa-name>.list file for to-be-purged ppa

```
deb https://ppa.launchpadcontent.net/oibaf/graphics-drivers/ubuntu/ mantic main
```

- deleted new style <ppa-name>.source

and ppa-purge worked like a charm

Revision history for this message
Nicolás Abel Carbone (nicocarbone) wrote :

Thanks @onestory-studio, that's a very good idea.

Revision history for this message
Ghadi Rahme (ghadi-rahme) wrote :

I wrote a fix and did a merge request adding deb822 support for ppa-purge. I did a test using the oibaf ppa in a mantic lxc container to verify the fix.
Also this issue should also be affecting noble but I only tested the fix on mantic for now.

Changed in ppa-purge (Ubuntu):
assignee: nobody → Ghadi Rahme (ghadi-rahme)
Changed in ppa-purge (Ubuntu Mantic):
assignee: nobody → Ghadi Rahme (ghadi-rahme)
description: updated
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Sponsored for noble.

Changed in ppa-purge (Ubuntu Noble):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ppa-purge - 0.2.8+bzr63-0ubuntu2

---------------
ppa-purge (0.2.8+bzr63-0ubuntu2) noble; urgency=high

  * Add support for deb822 source format. (LP: #2036761)

 -- Ghadi Elie Rahme <email address hidden> Fri, 02 Feb 2024 17:12:55 +0200

Changed in ppa-purge (Ubuntu Noble):
status: Fix Committed → Fix Released
Revision history for this message
Ghadi Rahme (ghadi-rahme) wrote :

Here is the mantic debdiff. Let me know if anything needs changing!

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "mantic.patch" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Heitor Alves de Siqueira (halves) wrote :

Hi Ghadi,

thanks for the debdiff! I've considered trimming down the new version to 0.2.8+bzr63-0ubuntu1.1 according to [0], but ultimately think your approach is correct (otherwise it'll be hard to update ppa-purge in Jammy if we ever need to!).

Tested and sponsored for Mantic.

[0] https://wiki.ubuntu.com/SecurityTeam/UpdatePreparation#Update_the_packaging

Changed in ppa-purge (Ubuntu Mantic):
status: Triaged → In Progress
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Jeremy, or anyone else affected,

Accepted ppa-purge into mantic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ppa-purge/0.2.8+bzr63-0ubuntu1.23.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-mantic to verification-done-mantic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-mantic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ppa-purge (Ubuntu Mantic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-mantic
Revision history for this message
Norbert (nrbrtx) wrote :
Download full text (9.1 KiB)

Actually the bug is not fixed on Noble, the PPA is not removed:

```
$ sudo bash -x -c "export DEBIAN_FRONTEND=noninteractive; apt-get -qq update && apt-get -qq dist-upgrade > /dev/null && apt-get -qq install software-properties-common apt-utils gpg-agent ppa-purge > /dev/null || apt-get -qq install software-properties-common apt-utils ppa-purge > /dev/null ; apt-cache policy software-properties-common ppa-purge; add-apt-repository -y ppa:nrbrtx/xorg-hotkeys > /dev/null; apt-cache policy | grep -E 'http://ppa|https://ppa' ; ppa-purge ppa:nrbrtx/xorg-hotkeys; grep -irE 'http://ppa|https://ppa' /etc/apt; apt-cache policy | grep -E 'http://ppa|https://ppa'"
[sudo] password for n:
+ export DEBIAN_FRONTEND=noninteractive
+ DEBIAN_FRONTEND=noninteractive
+ apt-get -qq update
+ apt-get -qq dist-upgrade
Extracting templates from packages: 100%
+ apt-get -qq install software-properties-common apt-utils gpg-agent ppa-purge
+ apt-cache policy software-properties-common ppa-purge
software-properties-common:
  Installed: 0.99.46
  Candidate: 0.99.46
  Version table:
 *** 0.99.46 500
        500 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu noble/main i386 Packages
        100 /var/lib/dpkg/status
ppa-purge:
  Installed: 0.2.8+bzr63-0ubuntu2
  Candidate: 0.2.8+bzr63-0ubuntu2
  Version table:
 *** 0.2.8+bzr63-0ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu noble/universe i386 Packages
        100 /var/lib/dpkg/status
+ add-apt-repository -y ppa:nrbrtx/xorg-hotkeys
+ apt-cache policy
+ grep -E 'http://ppa|https://ppa'
 500 https://ppa.launchpadcontent.net/nrbrtx/xorg-hotkeys/ubuntu noble/main i386 Packages
 500 https://ppa.launchpadcontent.net/nrbrtx/xorg-hotkeys/ubuntu noble/main amd64 Packages
+ ppa-purge ppa:nrbrtx/xorg-hotkeys
Updating packages lists
PPA to be removed: nrbrtx xorg-hotkeys
Package revert list generated:
 xserver-common/noble xserver-xorg-core/noble
xserver-xorg-legacy/noble

awk: not an option: -i
Updating packages lists
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Selected version '2:21.1.11-2ubuntu2ppa2' (PPA with patched xserver-xorg to fix bug 865:24.04/noble [all]) for 'xserver-common'
Selected version '2:21.1.11-2ubuntu2ppa2' (PPA with patched xserver-xorg to fix bug 865:24.04/noble [amd64]) for 'xserver-xorg-core'
Selected version '2:21.1.11-2ubuntu2ppa2' (PPA with patched xserver-xorg to fix bug 865:24.04/noble [amd64]) for 'xserver-xorg-legacy'
The following packages were automatically installed and are no longer required:
  cpdb-backend-cups cryptsetup
  cryptsetup-initramfs gir1.2-goa-1.0
  gsfonts irqbalance libatk-adaptor
  libbabeltrace1 libc6-dbg libcpdb-frontend2
  libcpdb2t64 libdebuginfod-common
  libecal-2.0-2 libipt2
  libmagickcore-6.q16-6
  libmagickcore-6.q16-6-extra
  libmagickwand-6.q16-6 libnetplan0
  libnsl-dev libperl5.36 libplist3
  libpython3.11 libpython3.11-minimal
  libpython3.11-stdlib
  libsource-highlight-common
  libsource-highlight4v5 libtirpc-dev
  libvpx8 numix-gtk-theme numix-icon-theme
  p7zip-full perl-...

Read more...

Revision history for this message
Ghadi Rahme (ghadi-rahme) wrote :

Hello Norbert, thank you for your testing and results.

This issue is caused by the fact that Ubuntu server and Ubuntu desktop use different types of awk. Ubuntu server uses gawk (GNU awk) by default while Ubuntu desktop ships with mawk which has less features than gawk and does not have support for the -i argument hence the error "awk: not an option: -i".
If your workflow depends on ppa-purge I recommend installing gawk (apt install gawk) and this will fix the issue temporarily while I get a permanent fix for ppa-purge.

side note: I am not sure why there is a difference in the default awk installed/used between Ubuntu desktop and server maybe it is an oversight and should be labeled as a bug? or maybe there is another reason that someone could clarify? To my knowledge gawk is the default version of awk on most linux distros and has all the features of mawk.

I will add gawk as a dependency to ppa-purge but I still believe that someone should look into why different versions of awk are shipped between server and desktop since this means shell scripts are not compatible between server and desktop by default.

Changed in ppa-purge (Ubuntu Mantic):
status: Fix Committed → In Progress
Changed in ppa-purge (Ubuntu Noble):
status: Fix Released → In Progress
tags: added: verification-failed verification-failed-mantic
removed: verification-needed verification-needed-mantic
tags: added: verification-needed verification-needed-mantic
removed: verification-failed verification-failed-mantic
Changed in ppa-purge (Ubuntu Mantic):
status: In Progress → Fix Released
status: Fix Released → Fix Committed
Changed in ppa-purge (Ubuntu Noble):
status: In Progress → Fix Released
Revision history for this message
Ghadi Rahme (ghadi-rahme) wrote :

I opened a new bug report for the awk issue affecting ppa-purge please redirect any new issues with the fix to here: https://bugs.launchpad.net/ubuntu/+source/ppa-purge/+bug/2060544

Revision history for this message
Norbert (nrbrtx) wrote :

Installing 'gawk' package fixed the issue for both noble and mantic-proposed.

Thank you!

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Apparently, there is nothing to be sponsored here, I am unsubscribing ~ubuntu-sponsors. If I misunderstood the status of this bug and there is something ready to be sponsored, please subscribe ~ubuntu-sponsors again.

Revision history for this message
Ghadi Rahme (ghadi-rahme) wrote :
Download full text (12.4 KiB)

Hello, sorry for the delay Lucas it's been a hectic few weeks. Here is my test for the proposed version.

[Testing proposed]

All tests were done in a mantic lxc container. The test ppa used is the oibaf mesa ppa.

- Make sure the oibaf ppa version of mesa is installed:

root@build-mantic:~# dpkg -l | grep mesa
ii libegl-mesa0:amd64 24.2~git2404300600.3daee9~oibaf~m amd64 free implementation of the EGL API -- Mesa vendor library
ii libgl1-mesa-dri:amd64 24.2~git2404300600.3daee9~oibaf~m amd64 free implementation of the OpenGL API -- DRI modules
ii libglapi-mesa:amd64 24.2~git2404300600.3daee9~oibaf~m amd64 free implementation of the GL API -- shared library
ii libglx-mesa0:amd64 24.2~git2404300600.3daee9~oibaf~m amd64 free implementation of the OpenGL API -- GLX vendor library
ii mesa-utils 9.0.0-1 amd64 Miscellaneous Mesa utilities -- symlinks
ii mesa-utils-bin:amd64 9.0.0-1 amd64 Miscellaneous Mesa utilities -- native applications
ii mesa-vulkan-drivers:amd64 24.2~git2404300600.3daee9~oibaf~m amd64 Mesa Vulkan graphics drivers

- Make sure the system is fully updated:

root@build-mantic:~# apt update && apt upgrade
Hit:1 http://archive.ubuntu.com/ubuntu mantic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu mantic-proposed InRelease
Hit:3 http://archive.ubuntu.com/ubuntu mantic-updates InRelease
Hit:4 http://security.ubuntu.com/ubuntu mantic-security InRelease
Hit:5 http://archive.ubuntu.com/ubuntu mantic-backports InRelease
Hit:6 https://ppa.launchpadcontent.net/oibaf/graphics-drivers/ubuntu mantic InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  libllvm15
Use 'apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

- Make sure proposed is enabled and ppa-purge is installed from proposed:

root@build-mantic:~# cat /etc/apt/sources.list | grep proposed
deb http://archive.ubuntu.com/ubuntu mantic-proposed restricted main multiverse universe

root@build-mantic:~# apt list ppa-purge
Listing... Done
ppa-purge/mantic-proposed,now 0.2.8+bzr63-0ubuntu1.23.10.1 all [installed]
N: There is 1 additional version. Please use the '-a' switch to see it

- Try removing the oibaf ppa using ppa-purge:

root@build-mantic:~# ppa-purge ppa:oibaf/graphics-drivers
Updating packages lists
PPA to be removed: oibaf graphics-drivers
Package revert list generated:
 libdrm-amdgpu1:amd64/mantic libdrm-common/mantic libdrm-intel1:amd64/mantic libdrm-nouveau2:amd64/mantic libdrm-radeon1:amd64/mantic libdrm2:amd64/mantic
libegl-mesa0:amd64/mantic libgbm1:amd64/mantic libgl1-mesa-dri:amd64/mantic libglapi-mesa:amd64/mantic libglx-mesa0:amd64/mantic
mesa-vulkan-drivers:amd64/man...

Revision history for this message
Paride Legovini (paride) wrote :

ppa-purge 0.2.8+bzr63-0ubuntu2 is currently in mantic-proposed, sponsored by halves. Unsubscribing ubuntu-sponsors.

Revision history for this message
Heitor Alves de Siqueira (halves) wrote :

Marking as verified according to comment #21

tags: added: verification-done verification-done-mantic
removed: verification-needed verification-needed-mantic
Changed in software-properties (Ubuntu):
status: Confirmed → Invalid
Changed in software-properties (Ubuntu Mantic):
status: Confirmed → Invalid
Changed in software-properties (Ubuntu Noble):
status: Confirmed → Invalid
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.