Merge lp:~jawn-smith/update-manager/apt-pkg-typeerrror into lp:update-manager

Proposed by William Wilson
Status: Merged
Merged at revision: 2904
Proposed branch: lp:~jawn-smith/update-manager/apt-pkg-typeerrror
Merge into: lp:update-manager
Diff against target: 27 lines (+8/-1)
2 files modified
UpdateManager/Core/UpdateList.py (+1/-1)
debian/changelog (+7/-0)
To merge this branch: bzr merge lp:~jawn-smith/update-manager/apt-pkg-typeerrror
Reviewer Review Type Date Requested Status
Brian Murray Approve
Review via email: mp+397044@code.launchpad.net

Description of the change

Adding an apt package to a list of strings causes typeerrors later on. Instead we should add the package name rather than the package object to the meta_pkgs list.

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'UpdateManager/Core/UpdateList.py'
2--- UpdateManager/Core/UpdateList.py 2021-01-08 15:33:42 +0000
3+++ UpdateManager/Core/UpdateList.py 2021-01-27 19:32:41 +0000
4@@ -439,7 +439,7 @@
5 meta_pkgs = [flavor_package, "ubuntu-standard", "ubuntu-minimal"]
6 for pkg in cache:
7 if linux_regexp.match(pkg.name):
8- meta_pkgs.append(pkg)
9+ meta_pkgs.append(pkg.name)
10 for pkg in meta_pkgs:
11 if pkg in cache:
12 meta_group.add(cache[pkg])
13
14=== modified file 'debian/changelog'
15--- debian/changelog 2021-01-14 18:43:01 +0000
16+++ debian/changelog 2021-01-27 19:32:41 +0000
17@@ -1,3 +1,10 @@
18+update-manager (1:21.04.5) hirsute; urgency=medium
19+
20+ * Fix crash caused by adding apt package objects to a list of
21+ strings (LP: #1913476)
22+
23+ -- William 'jawn-smith' Wilson <william.wilson@canonical.com> Wed, 27 Jan 2021 13:25:29 -0600
24+
25 update-manager (1:21.04.4) hirsute; urgency=medium
26
27 * Clean up apt cache binary files created by the unit tests.

Subscribers

People subscribed via source and target branches

to status/vote changes: