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
=== modified file 'UpdateManager/Core/UpdateList.py'
--- UpdateManager/Core/UpdateList.py 2021-01-08 15:33:42 +0000
+++ UpdateManager/Core/UpdateList.py 2021-01-27 19:32:41 +0000
@@ -439,7 +439,7 @@
439 meta_pkgs = [flavor_package, "ubuntu-standard", "ubuntu-minimal"]439 meta_pkgs = [flavor_package, "ubuntu-standard", "ubuntu-minimal"]
440 for pkg in cache:440 for pkg in cache:
441 if linux_regexp.match(pkg.name):441 if linux_regexp.match(pkg.name):
442 meta_pkgs.append(pkg)442 meta_pkgs.append(pkg.name)
443 for pkg in meta_pkgs:443 for pkg in meta_pkgs:
444 if pkg in cache:444 if pkg in cache:
445 meta_group.add(cache[pkg])445 meta_group.add(cache[pkg])
446446
=== modified file 'debian/changelog'
--- debian/changelog 2021-01-14 18:43:01 +0000
+++ debian/changelog 2021-01-27 19:32:41 +0000
@@ -1,3 +1,10 @@
1update-manager (1:21.04.5) hirsute; urgency=medium
2
3 * Fix crash caused by adding apt package objects to a list of
4 strings (LP: #1913476)
5
6 -- William 'jawn-smith' Wilson <william.wilson@canonical.com> Wed, 27 Jan 2021 13:25:29 -0600
7
1update-manager (1:21.04.4) hirsute; urgency=medium8update-manager (1:21.04.4) hirsute; urgency=medium
29
3 * Clean up apt cache binary files created by the unit tests.10 * Clean up apt cache binary files created by the unit tests.

Subscribers

People subscribed via source and target branches

to status/vote changes: