Merge lp:~robert-ancell/update-manager/ua-focal-merge into lp:~ubuntu-core-dev/update-manager/jammy
- ua-focal-merge
- Merge into jammy
Proposed by
Robert Ancell
Status: | Merged |
---|---|
Merge reported by: | Sebastien Bacher |
Merged at revision: | not available |
Proposed branch: | lp:~robert-ancell/update-manager/ua-focal-merge |
Merge into: | lp:~ubuntu-core-dev/update-manager/jammy |
Diff against target: |
598 lines (+295/-53) (has conflicts) 6 files modified
UpdateManager/Core/UpdateList.py (+54/-13) UpdateManager/Dialogs.py (+4/-4) UpdateManager/UpdateManager.py (+99/-32) UpdateManager/UpdatesAvailable.py (+21/-4) debian/changelog (+109/-0) tests/test_meta_release_core.py (+8/-0) Text conflict in UpdateManager/UpdateManager.py Text conflict in debian/changelog Text conflict in tests/test_meta_release_core.py |
To merge this branch: | bzr merge lp:~robert-ancell/update-manager/ua-focal-merge |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Core Development Team | Pending | ||
Review via email: mp+435931@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) wrote : | # |
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-02-05 21:17:38 +0000 | |||
3 | +++ UpdateManager/Core/UpdateList.py 2023-01-18 03:41:43 +0000 | |||
4 | @@ -44,11 +44,12 @@ | |||
5 | 44 | 44 | ||
6 | 45 | 45 | ||
7 | 46 | class UpdateItem(): | 46 | class UpdateItem(): |
9 | 47 | def __init__(self, pkg, name, icon, to_remove): | 47 | def __init__(self, pkg, name, icon, to_remove, sensitive=True): |
10 | 48 | self.icon = icon | 48 | self.icon = icon |
11 | 49 | self.name = name | 49 | self.name = name |
12 | 50 | self.pkg = pkg | 50 | self.pkg = pkg |
13 | 51 | self.to_remove = to_remove | 51 | self.to_remove = to_remove |
14 | 52 | self.sensitive = sensitive | ||
15 | 52 | 53 | ||
16 | 53 | def is_selected(self): | 54 | def is_selected(self): |
17 | 54 | if not self.to_remove: | 55 | if not self.to_remove: |
18 | @@ -60,13 +61,13 @@ | |||
19 | 60 | class UpdateGroup(UpdateItem): | 61 | class UpdateGroup(UpdateItem): |
20 | 61 | _depcache = {} | 62 | _depcache = {} |
21 | 62 | 63 | ||
24 | 63 | def __init__(self, pkg, name, icon, to_remove): | 64 | def __init__(self, pkg, name, icon, to_remove, sensitive=True): |
25 | 64 | UpdateItem.__init__(self, pkg, name, icon, to_remove) | 65 | UpdateItem.__init__(self, pkg, name, icon, to_remove, sensitive) |
26 | 65 | self._items = set() | 66 | self._items = set() |
27 | 66 | self._deps = set() | 67 | self._deps = set() |
28 | 67 | self.core_item = None | 68 | self.core_item = None |
29 | 68 | if pkg is not None: | 69 | if pkg is not None: |
31 | 69 | self.core_item = UpdateItem(pkg, name, icon, to_remove) | 70 | self.core_item = UpdateItem(pkg, name, icon, to_remove, sensitive) |
32 | 70 | self._items.add(self.core_item) | 71 | self._items.add(self.core_item) |
33 | 71 | 72 | ||
34 | 72 | @property | 73 | @property |
35 | @@ -75,10 +76,11 @@ | |||
36 | 75 | all_items.extend(self._items) | 76 | all_items.extend(self._items) |
37 | 76 | return sorted(all_items, key=lambda a: a.name.lower()) | 77 | return sorted(all_items, key=lambda a: a.name.lower()) |
38 | 77 | 78 | ||
40 | 78 | def add(self, pkg, cache=None, eventloop_callback=None, to_remove=False): | 79 | def add(self, pkg, cache=None, eventloop_callback=None, to_remove=False, |
41 | 80 | sensitive=True): | ||
42 | 79 | name = utils.get_package_label(pkg) | 81 | name = utils.get_package_label(pkg) |
43 | 80 | icon = Gio.ThemedIcon.new("package") | 82 | icon = Gio.ThemedIcon.new("package") |
45 | 81 | self._items.add(UpdateItem(pkg, name, icon, to_remove)) | 83 | self._items.add(UpdateItem(pkg, name, icon, to_remove, sensitive)) |
46 | 82 | # If the pkg is in self._deps, stop here. We have already calculated | 84 | # If the pkg is in self._deps, stop here. We have already calculated |
47 | 83 | # the recursive dependencies for this package, no need to do it again. | 85 | # the recursive dependencies for this package, no need to do it again. |
48 | 84 | if cache and pkg.name in cache and pkg.name not in self._deps: | 86 | if cache and pkg.name in cache and pkg.name not in self._deps: |
49 | @@ -154,27 +156,29 @@ | |||
50 | 154 | 156 | ||
51 | 155 | 157 | ||
52 | 156 | class UpdateApplicationGroup(UpdateGroup): | 158 | class UpdateApplicationGroup(UpdateGroup): |
54 | 157 | def __init__(self, pkg, application, to_remove): | 159 | def __init__(self, pkg, application, to_remove, sensitive=True): |
55 | 158 | name = application.get_display_name() | 160 | name = application.get_display_name() |
56 | 159 | icon = application.get_icon() | 161 | icon = application.get_icon() |
57 | 160 | super(UpdateApplicationGroup, self).__init__(pkg, name, icon, | 162 | super(UpdateApplicationGroup, self).__init__(pkg, name, icon, |
59 | 161 | to_remove) | 163 | to_remove, sensitive) |
60 | 162 | 164 | ||
61 | 163 | 165 | ||
62 | 164 | class UpdatePackageGroup(UpdateGroup): | 166 | class UpdatePackageGroup(UpdateGroup): |
64 | 165 | def __init__(self, pkg, to_remove): | 167 | def __init__(self, pkg, to_remove, sensitive=True): |
65 | 166 | name = utils.get_package_label(pkg) | 168 | name = utils.get_package_label(pkg) |
66 | 167 | icon = Gio.ThemedIcon.new("package") | 169 | icon = Gio.ThemedIcon.new("package") |
68 | 168 | super(UpdatePackageGroup, self).__init__(pkg, name, icon, to_remove) | 170 | super(UpdatePackageGroup, self).__init__(pkg, name, icon, to_remove, |
69 | 171 | sensitive) | ||
70 | 169 | 172 | ||
71 | 170 | 173 | ||
72 | 171 | class UpdateSystemGroup(UpdateGroup): | 174 | class UpdateSystemGroup(UpdateGroup): |
74 | 172 | def __init__(self, cache, to_remove): | 175 | def __init__(self, cache, to_remove, sensitive=True): |
75 | 173 | # Translators: the %s is a distro name, like 'Ubuntu' and 'base' as in | 176 | # Translators: the %s is a distro name, like 'Ubuntu' and 'base' as in |
76 | 174 | # the core components and packages. | 177 | # the core components and packages. |
77 | 175 | name = _("%s base") % utils.get_ubuntu_flavor_name(cache=cache) | 178 | name = _("%s base") % utils.get_ubuntu_flavor_name(cache=cache) |
78 | 176 | icon = Gio.ThemedIcon.new("distributor-logo") | 179 | icon = Gio.ThemedIcon.new("distributor-logo") |
80 | 177 | super(UpdateSystemGroup, self).__init__(None, name, icon, to_remove) | 180 | super(UpdateSystemGroup, self).__init__(None, name, icon, to_remove, |
81 | 181 | sensitive) | ||
82 | 178 | 182 | ||
83 | 179 | 183 | ||
84 | 180 | class UpdateOrigin(): | 184 | class UpdateOrigin(): |
85 | @@ -216,6 +220,7 @@ | |||
86 | 216 | self.security_groups = [] | 220 | self.security_groups = [] |
87 | 217 | self.kernel_autoremove_groups = [] | 221 | self.kernel_autoremove_groups = [] |
88 | 218 | self.duplicate_groups = [] | 222 | self.duplicate_groups = [] |
89 | 223 | self.ubuntu_pro_groups = [] | ||
90 | 219 | self.num_updates = 0 | 224 | self.num_updates = 0 |
91 | 220 | self.random = random.Random() | 225 | self.random = random.Random() |
92 | 221 | self.ignored_phased_updates = [] | 226 | self.ignored_phased_updates = [] |
93 | @@ -464,7 +469,8 @@ | |||
94 | 464 | 469 | ||
95 | 465 | return app_groups + pkg_groups | 470 | return app_groups + pkg_groups |
96 | 466 | 471 | ||
98 | 467 | def update(self, cache, eventloop_callback=None, duplicate_packages=[]): | 472 | def update(self, cache, eventloop_callback=None, duplicate_packages=[], |
99 | 473 | ua_security_packages=[]): | ||
100 | 468 | self.held_back = [] | 474 | self.held_back = [] |
101 | 469 | 475 | ||
102 | 470 | # do the upgrade | 476 | # do the upgrade |
103 | @@ -476,6 +482,34 @@ | |||
104 | 476 | kernel_autoremove_pkgs = [] | 482 | kernel_autoremove_pkgs = [] |
105 | 477 | duplicate_pkgs = [] | 483 | duplicate_pkgs = [] |
106 | 478 | 484 | ||
107 | 485 | class FakeUbuntuProPackageCandidate: | ||
108 | 486 | def __init__(self, source_name, version, size): | ||
109 | 487 | self.source_name = source_name | ||
110 | 488 | self.summary = source_name | ||
111 | 489 | self.description = source_name | ||
112 | 490 | self.version = version | ||
113 | 491 | self.size = size | ||
114 | 492 | self.downloadable = False | ||
115 | 493 | self.record = {} | ||
116 | 494 | |||
117 | 495 | class FakeUbuntuProPackage: | ||
118 | 496 | def __init__(self, package_name, version, size): | ||
119 | 497 | self.name = package_name | ||
120 | 498 | self.candidate = FakeUbuntuProPackageCandidate(package_name, | ||
121 | 499 | version, size) | ||
122 | 500 | self.marked_install = False | ||
123 | 501 | self.marked_upgrade = False | ||
124 | 502 | |||
125 | 503 | def mark_install(self): | ||
126 | 504 | pass | ||
127 | 505 | |||
128 | 506 | def mark_delete(self): | ||
129 | 507 | pass | ||
130 | 508 | fake_ua_packages = [] | ||
131 | 509 | for (package_name, version, size) in ua_security_packages: | ||
132 | 510 | fake_ua_packages.append(FakeUbuntuProPackage(package_name, | ||
133 | 511 | version, size)) | ||
134 | 512 | |||
135 | 479 | # Find all upgradable packages | 513 | # Find all upgradable packages |
136 | 480 | for pkg in cache: | 514 | for pkg in cache: |
137 | 481 | if pkg.is_upgradable or pkg.marked_install: | 515 | if pkg.is_upgradable or pkg.marked_install: |
138 | @@ -541,3 +575,10 @@ | |||
139 | 541 | cache, kernel_autoremove_pkgs, eventloop_callback, True) | 575 | cache, kernel_autoremove_pkgs, eventloop_callback, True) |
140 | 542 | self.duplicate_groups = self._make_groups( | 576 | self.duplicate_groups = self._make_groups( |
141 | 543 | cache, duplicate_pkgs, eventloop_callback, True) | 577 | cache, duplicate_pkgs, eventloop_callback, True) |
142 | 578 | if len(fake_ua_packages) > 0: | ||
143 | 579 | ubuntu_pro_group = UpdateGroup(None, | ||
144 | 580 | "Ubuntu Pro (enable in Settings…)", | ||
145 | 581 | None, False, False) | ||
146 | 582 | for package in fake_ua_packages: | ||
147 | 583 | ubuntu_pro_group.add(package) | ||
148 | 584 | self.ubuntu_pro_groups = [ubuntu_pro_group] | ||
149 | 544 | 585 | ||
150 | === modified file 'UpdateManager/Dialogs.py' | |||
151 | --- UpdateManager/Dialogs.py 2021-01-05 20:24:02 +0000 | |||
152 | +++ UpdateManager/Dialogs.py 2023-01-18 03:41:43 +0000 | |||
153 | @@ -168,10 +168,10 @@ | |||
154 | 168 | self.settings_button and \ | 168 | self.settings_button and \ |
155 | 169 | self._has_livepatch_settings_ui() and \ | 169 | self._has_livepatch_settings_ui() and \ |
156 | 170 | self.settings.get_int('launch-count') >= 4: | 170 | self.settings.get_int('launch-count') >= 4: |
161 | 171 | self.set_desc(_("<b>Tip:</b> You can use Livepatch to " | 171 | self.set_desc(_("<b>Tip:</b> You can use Livepatch with " |
162 | 172 | "keep your computer more secure between " | 172 | "Ubuntu Pro to keep your computer more " |
163 | 173 | "restarts.")) | 173 | "secure between restarts.")) |
164 | 174 | self.settings_button.set_label(_("Settings & Livepatch…")) | 174 | self.settings_button.set_label(_("Settings & Pro…")) |
165 | 175 | return | 175 | return |
166 | 176 | 176 | ||
167 | 177 | needs_reschedule = False | 177 | needs_reschedule = False |
168 | 178 | 178 | ||
169 | === modified file 'UpdateManager/UpdateManager.py' | |||
170 | --- UpdateManager/UpdateManager.py 2021-12-10 20:29:40 +0000 | |||
171 | +++ UpdateManager/UpdateManager.py 2023-01-18 03:41:43 +0000 | |||
172 | @@ -35,7 +35,12 @@ | |||
173 | 35 | DeprecationWarning) | 35 | DeprecationWarning) |
174 | 36 | 36 | ||
175 | 37 | import distro_info | 37 | import distro_info |
177 | 38 | import fnmatch | 38 | <<<<<<< TREE |
178 | 39 | import fnmatch | ||
179 | 40 | ======= | ||
180 | 41 | import fnmatch | ||
181 | 42 | import json | ||
182 | 43 | >>>>>>> MERGE-SOURCE | ||
183 | 39 | import os | 44 | import os |
184 | 40 | import subprocess | 45 | import subprocess |
185 | 41 | import sys | 46 | import sys |
186 | @@ -85,6 +90,7 @@ | |||
187 | 85 | self.unity = UnitySupport() | 90 | self.unity = UnitySupport() |
188 | 86 | self.controller = None | 91 | self.controller = None |
189 | 87 | self.cache = None | 92 | self.cache = None |
190 | 93 | self.ua_security_packages = [] | ||
191 | 88 | self.update_list = None | 94 | self.update_list = None |
192 | 89 | self.meta_release = None | 95 | self.meta_release = None |
193 | 90 | self.hwe_replacement_packages = None | 96 | self.hwe_replacement_packages = None |
194 | @@ -247,27 +253,72 @@ | |||
195 | 247 | cancelled_update, error_occurred) | 253 | cancelled_update, error_occurred) |
196 | 248 | self._start_pane(pane) | 254 | self._start_pane(pane) |
197 | 249 | 255 | ||
219 | 250 | def _check_oem_metapackages(self): | 256 | <<<<<<< TREE |
220 | 251 | di = distro_info.UbuntuDistroInfo() | 257 | def _check_oem_metapackages(self): |
221 | 252 | codename = get_dist() | 258 | di = distro_info.UbuntuDistroInfo() |
222 | 253 | lts = di.is_lts(codename) | 259 | codename = get_dist() |
223 | 254 | if not lts: | 260 | lts = di.is_lts(codename) |
224 | 255 | return None | 261 | if not lts: |
225 | 256 | OEM_PATH = os.path.join(GLib.get_user_runtime_dir(), | 262 | return None |
226 | 257 | "ubuntu-drivers-oem.package-list") | 263 | OEM_PATH = os.path.join(GLib.get_user_runtime_dir(), |
227 | 258 | if not os.path.exists(OEM_PATH): | 264 | "ubuntu-drivers-oem.package-list") |
228 | 259 | return None | 265 | if not os.path.exists(OEM_PATH): |
229 | 260 | 266 | return None | |
230 | 261 | # Packages that aren't installed but apply to this system | 267 | |
231 | 262 | with open(OEM_PATH, 'r') as f: | 268 | # Packages that aren't installed but apply to this system |
232 | 263 | self.oem_metapackages |= set(f.read().splitlines()) | 269 | with open(OEM_PATH, 'r') as f: |
233 | 264 | 270 | self.oem_metapackages |= set(f.read().splitlines()) | |
234 | 265 | # Packages that are already installed | 271 | |
235 | 266 | for pkg in self.cache: | 272 | # Packages that are already installed |
236 | 267 | if fnmatch.fnmatch(pkg.name, 'oem-*-meta') \ | 273 | for pkg in self.cache: |
237 | 268 | and pkg.installed: | 274 | if fnmatch.fnmatch(pkg.name, 'oem-*-meta') \ |
238 | 269 | self.oem_metapackages.add(pkg) | 275 | and pkg.installed: |
239 | 270 | 276 | self.oem_metapackages.add(pkg) | |
240 | 277 | |||
241 | 278 | ======= | ||
242 | 279 | def _check_oem_metapackages(self): | ||
243 | 280 | di = distro_info.UbuntuDistroInfo() | ||
244 | 281 | codename = get_dist() | ||
245 | 282 | lts = di.is_lts(codename) | ||
246 | 283 | if not lts: | ||
247 | 284 | return None | ||
248 | 285 | OEM_PATH = os.path.join(GLib.get_user_runtime_dir(), | ||
249 | 286 | "ubuntu-drivers-oem.package-list") | ||
250 | 287 | if not os.path.exists(OEM_PATH): | ||
251 | 288 | return None | ||
252 | 289 | |||
253 | 290 | # Packages that aren't installed but apply to this system | ||
254 | 291 | with open(OEM_PATH, 'r') as f: | ||
255 | 292 | self.oem_metapackages |= set(f.read().splitlines()) | ||
256 | 293 | |||
257 | 294 | # Packages that are already installed | ||
258 | 295 | for pkg in self.cache: | ||
259 | 296 | if fnmatch.fnmatch(pkg.name, 'oem-*-meta') \ | ||
260 | 297 | and pkg.installed: | ||
261 | 298 | self.oem_metapackages.add(pkg) | ||
262 | 299 | |||
263 | 300 | def _get_ua_security_status(self): | ||
264 | 301 | self.ua_security_packages = [] | ||
265 | 302 | try: | ||
266 | 303 | p = subprocess.Popen(['ua', 'security-status', '--format=json'], | ||
267 | 304 | stdout=subprocess.PIPE) | ||
268 | 305 | except OSError: | ||
269 | 306 | pass | ||
270 | 307 | else: | ||
271 | 308 | while p.poll() is None: | ||
272 | 309 | while Gtk.events_pending(): | ||
273 | 310 | Gtk.main_iteration() | ||
274 | 311 | time.sleep(0.05) | ||
275 | 312 | s = json.load(p.stdout) | ||
276 | 313 | for package in s.get('packages', []): | ||
277 | 314 | status = package.get('status', '') | ||
278 | 315 | if status == 'pending_attach': | ||
279 | 316 | name = package.get('name', '') | ||
280 | 317 | version = package.get('version', '') | ||
281 | 318 | size = package.get('download_size', 0) | ||
282 | 319 | self.ua_security_packages.append((name, version, size)) | ||
283 | 320 | |||
284 | 321 | >>>>>>> MERGE-SOURCE | ||
285 | 271 | def _make_available_pane(self, install_count, need_reboot=False, | 322 | def _make_available_pane(self, install_count, need_reboot=False, |
286 | 272 | cancelled_update=False, error_occurred=False): | 323 | cancelled_update=False, error_occurred=False): |
287 | 273 | self._check_hwe_support_status() | 324 | self._check_hwe_support_status() |
288 | @@ -421,19 +472,35 @@ | |||
289 | 421 | Gtk.main_iteration() | 472 | Gtk.main_iteration() |
290 | 422 | iterate() | 473 | iterate() |
291 | 423 | 474 | ||
301 | 424 | self._check_oem_metapackages() | 475 | <<<<<<< TREE |
302 | 425 | 476 | self._check_oem_metapackages() | |
303 | 426 | for pkgname in self.oem_metapackages: | 477 | |
304 | 427 | try: | 478 | for pkgname in self.oem_metapackages: |
305 | 428 | if not self.cache[pkgname].is_installed: | 479 | try: |
306 | 429 | self.cache[pkgname].mark_install() | 480 | if not self.cache[pkgname].is_installed: |
307 | 430 | except SystemError: | 481 | self.cache[pkgname].mark_install() |
308 | 431 | pass | 482 | except SystemError: |
309 | 432 | 483 | pass | |
310 | 484 | |||
311 | 485 | ======= | ||
312 | 486 | self._check_oem_metapackages() | ||
313 | 487 | |||
314 | 488 | self._get_ua_security_status() | ||
315 | 489 | |||
316 | 490 | for pkgname in self.oem_metapackages: | ||
317 | 491 | try: | ||
318 | 492 | if not self.cache[pkgname].is_installed: | ||
319 | 493 | self.cache[pkgname].mark_install() | ||
320 | 494 | except SystemError: | ||
321 | 495 | pass | ||
322 | 496 | |||
323 | 497 | >>>>>>> MERGE-SOURCE | ||
324 | 433 | self.update_list = UpdateList(self) | 498 | self.update_list = UpdateList(self) |
325 | 434 | try: | 499 | try: |
326 | 435 | self.update_list.update(self.cache, eventloop_callback=iterate, | 500 | self.update_list.update(self.cache, eventloop_callback=iterate, |
328 | 436 | duplicate_packages=self.duplicate_packages) | 501 | duplicate_packages=self.duplicate_packages, |
329 | 502 | ua_security_packages=self. | ||
330 | 503 | ua_security_packages) | ||
331 | 437 | except SystemError as e: | 504 | except SystemError as e: |
332 | 438 | header = _("Could not calculate the upgrade") | 505 | header = _("Could not calculate the upgrade") |
333 | 439 | desc = _("An unresolvable problem occurred while " | 506 | desc = _("An unresolvable problem occurred while " |
334 | 440 | 507 | ||
335 | === modified file 'UpdateManager/UpdatesAvailable.py' | |||
336 | --- UpdateManager/UpdatesAvailable.py 2020-12-14 11:10:57 +0000 | |||
337 | +++ UpdateManager/UpdatesAvailable.py 2023-01-18 03:41:43 +0000 | |||
338 | @@ -74,7 +74,8 @@ | |||
339 | 74 | # - screen reader does not say "Downloaded" for downloaded updates | 74 | # - screen reader does not say "Downloaded" for downloaded updates |
340 | 75 | 75 | ||
341 | 76 | # list constants | 76 | # list constants |
343 | 77 | (LIST_NAME, LIST_UPDATE_DATA, LIST_SIZE, LIST_TOGGLE_ACTIVE) = range(4) | 77 | (LIST_NAME, LIST_UPDATE_DATA, LIST_SIZE, LIST_TOGGLE_ACTIVE, |
344 | 78 | LIST_SENSITIVE) = range(5) | ||
345 | 78 | 79 | ||
346 | 79 | # NetworkManager enums | 80 | # NetworkManager enums |
347 | 80 | from .Core.roam import NetworkManagerHelper | 81 | from .Core.roam import NetworkManagerHelper |
348 | @@ -261,7 +262,7 @@ | |||
349 | 261 | changes_buffer.create_tag("versiontag", weight=Pango.Weight.BOLD) | 262 | changes_buffer.create_tag("versiontag", weight=Pango.Weight.BOLD) |
350 | 262 | 263 | ||
351 | 263 | # the treeview (move into it's own code!) | 264 | # the treeview (move into it's own code!) |
353 | 264 | self.store = Gtk.TreeStore(str, GObject.TYPE_PYOBJECT, str, bool) | 265 | self.store = Gtk.TreeStore(str, GObject.TYPE_PYOBJECT, str, bool, bool) |
354 | 265 | self.treeview_update.set_model(None) | 266 | self.treeview_update.set_model(None) |
355 | 266 | 267 | ||
356 | 267 | self.image_restart.set_from_gicon(self.get_restart_icon(), | 268 | self.image_restart.set_from_gicon(self.get_restart_icon(), |
357 | @@ -293,6 +294,8 @@ | |||
358 | 293 | pkg_column.pack_start(pkg_toggle_renderer, False) | 294 | pkg_column.pack_start(pkg_toggle_renderer, False) |
359 | 294 | pkg_column.add_attribute(pkg_toggle_renderer, | 295 | pkg_column.add_attribute(pkg_toggle_renderer, |
360 | 295 | 'active', LIST_TOGGLE_ACTIVE) | 296 | 'active', LIST_TOGGLE_ACTIVE) |
361 | 297 | pkg_column.add_attribute(pkg_toggle_renderer, | ||
362 | 298 | 'sensitive', LIST_SENSITIVE) | ||
363 | 296 | pkg_column.set_cell_data_func(pkg_toggle_renderer, | 299 | pkg_column.set_cell_data_func(pkg_toggle_renderer, |
364 | 297 | self.pkg_toggle_renderer_data_func) | 300 | self.pkg_toggle_renderer_data_func) |
365 | 298 | 301 | ||
366 | @@ -319,6 +322,8 @@ | |||
367 | 319 | size_column = Gtk.TreeViewColumn(_("Download"), size_renderer, | 322 | size_column = Gtk.TreeViewColumn(_("Download"), size_renderer, |
368 | 320 | text=LIST_SIZE) | 323 | text=LIST_SIZE) |
369 | 321 | size_column.set_sizing(Gtk.TreeViewColumnSizing.AUTOSIZE) | 324 | size_column.set_sizing(Gtk.TreeViewColumnSizing.AUTOSIZE) |
370 | 325 | size_column.add_attribute(size_renderer, | ||
371 | 326 | 'sensitive', LIST_SENSITIVE) | ||
372 | 322 | self.treeview_update.append_column(size_column) | 327 | self.treeview_update.append_column(size_column) |
373 | 323 | 328 | ||
374 | 324 | self.treeview_update.set_headers_visible(True) | 329 | self.treeview_update.set_headers_visible(True) |
375 | @@ -404,8 +409,11 @@ | |||
376 | 404 | def restart_icon_renderer_data_func(self, cell_layout, renderer, model, | 409 | def restart_icon_renderer_data_func(self, cell_layout, renderer, model, |
377 | 405 | iter, user_data): | 410 | iter, user_data): |
378 | 406 | data = model.get_value(iter, LIST_UPDATE_DATA) | 411 | data = model.get_value(iter, LIST_UPDATE_DATA) |
379 | 412 | sensitive = model.get_value(iter, LIST_SENSITIVE) | ||
380 | 407 | path = model.get_path(iter) | 413 | path = model.get_path(iter) |
381 | 408 | 414 | ||
382 | 415 | renderer.set_sensitive(sensitive) | ||
383 | 416 | |||
384 | 409 | requires_restart = False | 417 | requires_restart = False |
385 | 410 | if data.item and data.item.pkg: | 418 | if data.item and data.item.pkg: |
386 | 411 | requires_restart = self.pkg_requires_restart(data.item.pkg) | 419 | requires_restart = self.pkg_requires_restart(data.item.pkg) |
387 | @@ -433,6 +441,7 @@ | |||
388 | 433 | if data.item: | 441 | if data.item: |
389 | 434 | activatable = data.item.pkg.name not in self.list.held_back | 442 | activatable = data.item.pkg.name not in self.list.held_back |
390 | 435 | inconsistent = False | 443 | inconsistent = False |
391 | 444 | renderer.set_sensitive(data.item.sensitive) | ||
392 | 436 | elif data.group: | 445 | elif data.group: |
393 | 437 | activatable = True | 446 | activatable = True |
394 | 438 | inconsistent = data.group.selection_is_inconsistent() | 447 | inconsistent = data.group.selection_is_inconsistent() |
395 | @@ -485,8 +494,11 @@ | |||
396 | 485 | def pkg_label_renderer_data_func(self, cell_layout, renderer, model, | 494 | def pkg_label_renderer_data_func(self, cell_layout, renderer, model, |
397 | 486 | iter, user_data): | 495 | iter, user_data): |
398 | 487 | data = model.get_value(iter, LIST_UPDATE_DATA) | 496 | data = model.get_value(iter, LIST_UPDATE_DATA) |
399 | 497 | sensitive = model.get_value(iter, LIST_SENSITIVE) | ||
400 | 488 | name = GLib.markup_escape_text(model.get_value(iter, LIST_NAME)) | 498 | name = GLib.markup_escape_text(model.get_value(iter, LIST_NAME)) |
401 | 489 | 499 | ||
402 | 500 | renderer.set_sensitive(sensitive) | ||
403 | 501 | |||
404 | 490 | if data.group: | 502 | if data.group: |
405 | 491 | markup = name | 503 | markup = name |
406 | 492 | elif data.item: | 504 | elif data.item: |
407 | @@ -1000,6 +1012,7 @@ | |||
408 | 1000 | name, | 1012 | name, |
409 | 1001 | UpdateData(groups, None, None), | 1013 | UpdateData(groups, None, None), |
410 | 1002 | humanize_size(total_size), | 1014 | humanize_size(total_size), |
411 | 1015 | True, | ||
412 | 1003 | True | 1016 | True |
413 | 1004 | ] | 1017 | ] |
414 | 1005 | return self.store.append(None, header_row) | 1018 | return self.store.append(None, header_row) |
415 | @@ -1023,7 +1036,8 @@ | |||
416 | 1023 | group.name, | 1036 | group.name, |
417 | 1024 | UpdateData(None, group, group_is_item), | 1037 | UpdateData(None, group, group_is_item), |
418 | 1025 | humanize_size(group.get_total_size()), | 1038 | humanize_size(group.get_total_size()), |
420 | 1026 | True | 1039 | True, |
421 | 1040 | group.sensitive | ||
422 | 1027 | ] | 1041 | ] |
423 | 1028 | group_iter = self.store.append(None, group_row) | 1042 | group_iter = self.store.append(None, group_row) |
424 | 1029 | 1043 | ||
425 | @@ -1034,7 +1048,8 @@ | |||
426 | 1034 | item.name, | 1048 | item.name, |
427 | 1035 | UpdateData(None, None, item), | 1049 | UpdateData(None, None, item), |
428 | 1036 | humanize_size(getattr(item.pkg.candidate, "size", 0)), | 1050 | humanize_size(getattr(item.pkg.candidate, "size", 0)), |
430 | 1037 | True | 1051 | True, |
431 | 1052 | group.sensitive | ||
432 | 1038 | ] | 1053 | ] |
433 | 1039 | self.store.append(group_iter, item_row) | 1054 | self.store.append(group_iter, item_row) |
434 | 1040 | 1055 | ||
435 | @@ -1077,6 +1092,8 @@ | |||
436 | 1077 | _("Duplicate packages to be removed"), | 1092 | _("Duplicate packages to be removed"), |
437 | 1078 | self.list.duplicate_groups) | 1093 | self.list.duplicate_groups) |
438 | 1079 | self._add_groups(self.list.duplicate_groups) | 1094 | self._add_groups(self.list.duplicate_groups) |
439 | 1095 | if self.list.ubuntu_pro_groups: | ||
440 | 1096 | self._add_groups(self.list.ubuntu_pro_groups) | ||
441 | 1080 | 1097 | ||
442 | 1081 | self.treeview_update.set_model(self.store) | 1098 | self.treeview_update.set_model(self.store) |
443 | 1082 | self.pkg_cell_area.indent_toplevel = ( | 1099 | self.pkg_cell_area.indent_toplevel = ( |
444 | 1083 | 1100 | ||
445 | === modified file 'UpdateManager/backend/__init__.py' | |||
446 | === modified file 'debian/changelog' | |||
447 | --- debian/changelog 2022-12-01 19:09:52 +0000 | |||
448 | +++ debian/changelog 2023-01-18 03:41:43 +0000 | |||
449 | @@ -1,3 +1,4 @@ | |||
450 | 1 | <<<<<<< TREE | ||
451 | 1 | update-manager (1:22.04.10) jammy; urgency=medium | 2 | update-manager (1:22.04.10) jammy; urgency=medium |
452 | 2 | 3 | ||
453 | 3 | [ Renan Rodrigo ] | 4 | [ Renan Rodrigo ] |
454 | @@ -218,6 +219,114 @@ | |||
455 | 218 | 219 | ||
456 | 219 | -- Brian Murray <brian@ubuntu.com> Wed, 27 May 2020 13:29:24 -0700 | 220 | -- Brian Murray <brian@ubuntu.com> Wed, 27 May 2020 13:29:24 -0700 |
457 | 220 | 221 | ||
458 | 222 | ======= | ||
459 | 223 | update-manager (1:20.04.10.12) focal; urgency=medium | ||
460 | 224 | |||
461 | 225 | * Show pending Ubuntu pro packages (LP: #1990450) | ||
462 | 226 | |||
463 | 227 | -- Robert Ancell <robert.ancell@canonical.com> Wed, 18 Jan 2023 15:03:27 +1300 | ||
464 | 228 | |||
465 | 229 | update-manager (1:20.04.10.11) focal; urgency=medium | ||
466 | 230 | |||
467 | 231 | [ Renan Rodrigo ] | ||
468 | 232 | * ubuntu-security-status: Don't show ESM Apps information when the service | ||
469 | 233 | is disabled, and prefer 'pro security-status' when it is available. | ||
470 | 234 | (LP: #1991533) | ||
471 | 235 | |||
472 | 236 | -- Brian Murray <brian@ubuntu.com> Thu, 01 Dec 2022 11:10:57 -0800 | ||
473 | 237 | |||
474 | 238 | update-manager (1:20.04.10.10) focal; urgency=medium | ||
475 | 239 | |||
476 | 240 | * ubuntu-security-status: Check if ESM for Apps is enabled or if it is not | ||
477 | 241 | in beta before displaying information about the packages available from | ||
478 | 242 | there. Additionally, improve pluralization in a couple of locations. | ||
479 | 243 | (LP: #1955471) | ||
480 | 244 | |||
481 | 245 | -- Brian Murray <brian@ubuntu.com> Fri, 14 Jan 2022 10:28:42 -0800 | ||
482 | 246 | |||
483 | 247 | update-manager (1:20.04.10.9) focal; urgency=medium | ||
484 | 248 | |||
485 | 249 | * ubuntu-security-status: use ubuntu-advantage-tools to determine whether or | ||
486 | 250 | not livepatch or esm are enabled and if the system is attached. Thanks to | ||
487 | 251 | Chad Smith for the patch. (LP: #1938043) | ||
488 | 252 | |||
489 | 253 | -- Brian Murray <brian@ubuntu.com> Fri, 03 Sep 2021 15:17:22 -0700 | ||
490 | 254 | |||
491 | 255 | update-manager (1:20.04.10.8) focal; urgency=medium | ||
492 | 256 | |||
493 | 257 | * tests/test_meta_release_core.py: switch a test from using lucid to bionic | ||
494 | 258 | as precise was removed from the archive. (LP: #1929865) | ||
495 | 259 | |||
496 | 260 | -- Brian Murray <brian@ubuntu.com> Thu, 27 May 2021 13:36:54 -0700 | ||
497 | 261 | |||
498 | 262 | update-manager (1:20.04.10.7) focal; urgency=medium | ||
499 | 263 | |||
500 | 264 | * tests/test_update_list.py: rewrite how APT::VersionedKernelPackages is set. | ||
501 | 265 | (LP: #1924809) | ||
502 | 266 | * debian/tests/control: add apt to the list of Depends. | ||
503 | 267 | |||
504 | 268 | -- Brian Murray <brian@ubuntu.com> Fri, 16 Apr 2021 16:25:21 -0700 | ||
505 | 269 | |||
506 | 270 | update-manager (1:20.04.10.6) focal; urgency=medium | ||
507 | 271 | |||
508 | 272 | * UpdateManager/Core/UpdateList.py: change to a regex from a static list | ||
509 | 273 | of packages to be grouped under Ubuntu Base (LP: #1902025) | ||
510 | 274 | * Clean up apt cache binary files left behind by tests | ||
511 | 275 | * Rename meta_pkgs to ubuntu_base_pkgs to make it more clear to the | ||
512 | 276 | reader which packages should be included | ||
513 | 277 | * Add tests in to ensure Ubuntu base packages are not grouped when | ||
514 | 278 | staged for removal (LP: #1912718) | ||
515 | 279 | |||
516 | 280 | -- William 'jawn-smith' Wilson <william.wilson@canonical.com> Wed, 10 Feb 2021 14:39:27 -0600 | ||
517 | 281 | |||
518 | 282 | update-manager (1:20.04.10.5) focal; urgency=medium | ||
519 | 283 | |||
520 | 284 | * UpdateManager/backend/__init__.py: Really make commit_oem a no-op in the | ||
521 | 285 | base class to avoid crash when people force synaptic backend (LP: #1913732) | ||
522 | 286 | * Fix typo in previous changelog | ||
523 | 287 | |||
524 | 288 | -- Julian Andres Klode <juliank@ubuntu.com> Fri, 29 Jan 2021 17:43:01 +0100 | ||
525 | 289 | |||
526 | 290 | update-manager (1:20.04.10.4) focal; urgency=medium | ||
527 | 291 | |||
528 | 292 | * Revert previous change to UpdateList.py, as it breaks kernel | ||
529 | 293 | autoremoval (LP: #1912718) | ||
530 | 294 | * UpdateManager/backend/__init__.py: Make commit_oem a no-op in the base | ||
531 | 295 | class to avoid crash when people force synaptic backend (LP: #1913732) | ||
532 | 296 | |||
533 | 297 | -- Julian Andres Klode <juliank@ubuntu.com> Fri, 29 Jan 2021 12:50:23 +0100 | ||
534 | 298 | |||
535 | 299 | update-manager (1:20.04.10.3) focal; urgency=medium | ||
536 | 300 | |||
537 | 301 | [ Julian Andres Klode ] | ||
538 | 302 | * UpdateManager/backend/__init__.py: Fix unbound local variables regression | ||
539 | 303 | introduced by the previous SRU (See LP 1910556), and correct comment | ||
540 | 304 | |||
541 | 305 | [ William Wilson ] | ||
542 | 306 | * UpdateManager/Core/UpdateList.py: change to a regex from a static list | ||
543 | 307 | of packages to be grouped under Ubuntu Base (LP: #1902025) | ||
544 | 308 | |||
545 | 309 | -- Brian Murray <brian@ubuntu.com> Wed, 13 Jan 2021 08:35:58 -0800 | ||
546 | 310 | |||
547 | 311 | update-manager (1:20.04.10.2) focal; urgency=medium | ||
548 | 312 | |||
549 | 313 | [ Iain Lane & Julian Andres Klode ] | ||
550 | 314 | * Support post install enablement of OEM-enabled devices (LP: #1908050) | ||
551 | 315 | |||
552 | 316 | -- Julian Andres Klode <juliank@ubuntu.com> Mon, 14 Dec 2020 12:24:18 +0100 | ||
553 | 317 | |||
554 | 318 | update-manager (1:20.04.10.1) focal; urgency=medium | ||
555 | 319 | |||
556 | 320 | * UpdateManager/UpdateManager.py: when refreshing the cache and encountering | ||
557 | 321 | an error return rather than trying to use the undefined cache which causes | ||
558 | 322 | crashes. Additionally, don't present the dialog with a "Try Again" button | ||
559 | 323 | which won't do anything. (LP: #1826213) | ||
560 | 324 | * Fix hang in apturl-gtk. (LP: #1874591) | ||
561 | 325 | * Fix crash in snap updates when refreshing the cache fails. (LP: #1880987) | ||
562 | 326 | |||
563 | 327 | -- Brian Murray <brian@ubuntu.com> Wed, 03 Jun 2020 10:18:00 -0700 | ||
564 | 328 | |||
565 | 329 | >>>>>>> MERGE-SOURCE | ||
566 | 221 | update-manager (1:20.04.10) focal; urgency=medium | 330 | update-manager (1:20.04.10) focal; urgency=medium |
567 | 222 | 331 | ||
568 | 223 | * Fix intermittent hang during snap updates (LP: #1874469). | 332 | * Fix intermittent hang during snap updates (LP: #1874469). |
569 | 224 | 333 | ||
570 | === modified file 'debian/control' | |||
571 | === modified file 'tests/test_meta_release_core.py' | |||
572 | --- tests/test_meta_release_core.py 2022-01-26 23:05:32 +0000 | |||
573 | +++ tests/test_meta_release_core.py 2023-01-18 03:41:43 +0000 | |||
574 | @@ -9,8 +9,12 @@ | |||
575 | 9 | import random | 9 | import random |
576 | 10 | import sys | 10 | import sys |
577 | 11 | import tempfile | 11 | import tempfile |
578 | 12 | <<<<<<< TREE | ||
579 | 12 | import time | 13 | import time |
580 | 13 | import unittest | 14 | import unittest |
581 | 15 | ======= | ||
582 | 16 | import glob | ||
583 | 17 | >>>>>>> MERGE-SOURCE | ||
584 | 14 | try: | 18 | try: |
585 | 15 | from test.support import EnvironmentVarGuard | 19 | from test.support import EnvironmentVarGuard |
586 | 16 | except ImportError: | 20 | except ImportError: |
587 | @@ -181,7 +185,11 @@ | |||
588 | 181 | ltses = [supported for supported in di.supported() | 185 | ltses = [supported for supported in di.supported() |
589 | 182 | if di.is_lts(supported)] | 186 | if di.is_lts(supported)] |
590 | 183 | with EnvironmentVarGuard() as environ: | 187 | with EnvironmentVarGuard() as environ: |
591 | 188 | <<<<<<< TREE | ||
592 | 184 | environ["META_RELEASE_FAKE_CODENAME"] = ltses[-2] | 189 | environ["META_RELEASE_FAKE_CODENAME"] = ltses[-2] |
593 | 190 | ======= | ||
594 | 191 | environ["META_RELEASE_FAKE_CODENAME"] = "bionic" | ||
595 | 192 | >>>>>>> MERGE-SOURCE | ||
596 | 185 | meta = MetaReleaseCore(forceDownload=True) | 193 | meta = MetaReleaseCore(forceDownload=True) |
597 | 186 | while meta.downloading: | 194 | while meta.downloading: |
598 | 187 | time.sleep(0.1) | 195 | time.sleep(0.1) |
Merged because this has been uploaded as a SRU.