add-apt-repository --list not returning any deb822 repositories

Bug #2060331 reported by Josh Lopez
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Fix Released
Low
Nick Rosbrook

Bug Description

Recreating the following bug report (#2052851) with a new title per Jeremy Bícha's (jbicha) request:

https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/2052851

---

On Ubuntu 23.10:

* When adding a PPA, 'add-apt-repository' will add the repository in the new deb822 format as a '<ppa-name>.sources' file in '/etc/apt/sources.list.d'

* However, 'add-apt-repository --list' cannot see/understand the new '<ppa-name>.sources' file

For example, with the flacon ppa (https://launchpad.net/~flacon/+archive/ubuntu/ppa):

1. 'sudo add-apt-repository ppa:flacon/ppa' adds the flacon repo as '/etc/apt/sources.list.d/flacon-ubuntu-ppa-mantic.sources'

2. apt can install and update from the new repo, as expected. you can also remove the repo, as expected, by running 'sudo add-apt-repository --remove ppa:flacon/ppa'

3. However, 'add-apt-repository --list' does not list the repo as it should. GUI package managers such as Muon and Synaptic also do not see the new repo.

It makes working with packages frustrating, and unfortunately, per Julian Andres Klode (juliank), there seems to be no plan to fix the broken 'software-properties-common' any time soon. See here:

https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/2033949

Also see related issues:

https://bugs.launchpad.net/ubuntu/+source/ppa-purge/+bug/2036761
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/2037210
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2036288
https://lists.ubuntu.com/archives/ubuntu-devel/2023-September/042791.html

Revision history for this message
Josh Lopez (mojo.lo) wrote :

In case anyone else comes across this bug, the following workaround to create the old style '<ppa-name>.list' file works well:

---

1. Create an 'aptaddppa' function (ZSH):

---

aptaddppa () {

     curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x${4}" | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/"${1}".gpg

     echo "deb [arch=$(dpkg --print-architecture)] ${2} $(lsb_release -cs) ${3}" | sudo tee /etc/apt/sources.list.d/"${1}".list

     sudo apt update
}

---

2. From the command line:

---

$ aptaddppa flacon https://ppa.launchpadcontent.net/flacon/ppa/ubuntu main 0606FBEA73863686801BE20ED5790E4FF2A61FE5

Revision history for this message
Nick Rosbrook (enr0n) wrote :

Thanks for the bug report. This was overlooked when adding deb822 support.

Changed in software-properties (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
tags: added: foundations-todo
Nick Rosbrook (enr0n)
Changed in software-properties (Ubuntu):
assignee: nobody → Nick Rosbrook (enr0n)
Nick Rosbrook (enr0n)
Changed in software-properties (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.99.48

---------------
software-properties (0.99.48) noble; urgency=medium

  * Fix Python's warning of invalid escape sequence (LP: #2059412).
  * Make pressing enter on close button of out-of-date cache dialog trigger
    the close button, not the reload button (LP: #2061978).
  * Limit the comments in 'other software' tab to a single line (LP: #2060915).
  * apt-add-repository --list now displays deb822 sources (LP: #2060331).

 -- Nathan Pratta Teodosio <email address hidden> Thu, 18 Apr 2024 09:17:51 +0200

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