Merge ~nteodosio/software-properties:ppa-removal into software-properties:ubuntu/master

Proposed by Nathan Teodosio
Status: Merged
Merged at revision: dc9b1e1492eeb1e0ff91f7361521d12a6c0af1c3
Proposed branch: ~nteodosio/software-properties:ppa-removal
Merge into: software-properties:ubuntu/master
Diff against target: 31 lines (+11/-1)
2 files modified
debian/changelog (+7/-0)
softwareproperties/SoftwareProperties.py (+4/-1)
Reviewer Review Type Date Requested Status
Paride Legovini Approve
Review via email: mp+463870@code.launchpad.net

Description of the change

Fixes failed Deb822 format PPA removal.

 LP:2059796

To post a comment you must log in.
Revision history for this message
Paride Legovini (paride) wrote :

The diff itself LGTM, but I requested more info on the bug itself:

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

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

Thanks for the extra info. This LGTM.

I'll test a package build locally before merging.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 18e3c48..2afafdd 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+software-properties (0.99.47) noble; urgency=medium
7+
8+ * Fix failed removal of Deb822 formated source in "Other Software" tab
9+ (LP: #2059796).
10+
11+ -- Nathan Pratta Teodosio <nathan.teodosio@canonical.com> Tue, 09 Apr 2024 09:02:50 +0200
12+
13 software-properties (0.99.46) noble; urgency=medium
14
15 * ppa: do not enable deb822 logic when input is sources.list line or URI
16diff --git a/softwareproperties/SoftwareProperties.py b/softwareproperties/SoftwareProperties.py
17index 636ece5..25f1340 100644
18--- a/softwareproperties/SoftwareProperties.py
19+++ b/softwareproperties/SoftwareProperties.py
20@@ -799,7 +799,10 @@ class SoftwareProperties(object):
21 # file are gone and the file is not saved. we work around that
22 # here
23 if source.file != apt_pkg.config.find_file("Dir::Etc::sourcelist"):
24- self.sourceslist.list.append(SourceEntry("", file=source.file))
25+ if source.file.endswith(".sources"):
26+ self.sourceslist.list.append(Deb822SourceEntry("", file=source.file))
27+ else:
28+ self.sourceslist.list.append(SourceEntry("", file=source.file))
29 try:
30 self.sourceslist.remove(source)
31 except ValueError:

Subscribers

People subscribed via source and target branches