Merge lp:~marcustomlinson/update-manager/update-manager into lp:update-manager

Proposed by Marcus Tomlinson
Status: Merged
Merged at revision: 2878
Proposed branch: lp:~marcustomlinson/update-manager/update-manager
Merge into: lp:update-manager
Diff against target: 41 lines (+21/-2)
2 files modified
UpdateManager/backend/__init__.py (+14/-2)
debian/changelog (+7/-0)
To merge this branch: bzr merge lp:~marcustomlinson/update-manager/update-manager
Reviewer Review Type Date Requested Status
Brian Murray Approve
Review via email: mp+382291@code.launchpad.net

Commit message

deb2snap: Don't replace debs that were manually installed via another package

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

Looks good to me, thanks!

review: Approve
2878. By Brian Murray

merge lp:~marcustomlinson/update-manager/update-manager

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'UpdateManager/backend/__init__.py'
2--- UpdateManager/backend/__init__.py 2020-04-07 12:00:12 +0000
3+++ UpdateManager/backend/__init__.py 2020-04-15 12:37:40 +0000
4@@ -122,8 +122,20 @@
5 for snap, (deb, _) in seeded_snaps.items():
6 # if the deb is installed and was not manually installed,
7 # replace it
8- if (deb in cache and cache[deb].is_auto_installed):
9- duplicates.append(deb)
10+ if (deb in cache and cache[deb].is_installed):
11+ deb_is_auto = True
12+ cache[deb].mark_delete()
13+
14+ for pkg in cache.get_changes():
15+ if (pkg.is_installed and pkg.marked_delete
16+ and not pkg.is_auto_installed):
17+ deb_is_auto = False
18+ break
19+
20+ cache.clear()
21+
22+ if deb_is_auto:
23+ duplicates.append(deb)
24
25 return duplicates
26
27
28=== modified file 'debian/changelog'
29--- debian/changelog 2020-04-08 16:59:53 +0000
30+++ debian/changelog 2020-04-15 12:37:40 +0000
31@@ -1,3 +1,10 @@
32+update-manager (1:20.04.6) focal; urgency=medium
33+
34+ * deb2snap: Don't replace debs that were manually installed via
35+ another package (LP: #1872958).
36+
37+ -- Marcus Tomlinson <marcus.tomlinson@canonical.com> Wed, 15 Apr 2020 11:34:33 +0100
38+
39 update-manager (1:20.04.5) focal; urgency=medium
40
41 * Fix TypeError crash in update() (LP: #1871490).

Subscribers

People subscribed via source and target branches

to status/vote changes: