Merge ~nteodosio/update-manager:bionic-ua into update-manager:main

Proposed by Nathan Teodosio
Status: Superseded
Proposed branch: ~nteodosio/update-manager:bionic-ua
Merge into: update-manager:main
Diff against target: 2128 lines (+863/-137) (has conflicts)
21 files modified
.gitignore (+2/-0)
HweSupportStatus/consts.py (+26/-0)
UpdateManager/Core/MetaRelease.py (+14/-0)
UpdateManager/Core/UpdateList.py (+129/-0)
UpdateManager/Core/utils.py (+17/-0)
UpdateManager/Dialogs.py (+28/-1)
UpdateManager/UpdateManager.py (+120/-14)
UpdateManager/UpdateManagerVersion.py (+4/-0)
UpdateManager/UpdatesAvailable.py (+105/-17)
UpdateManager/backend/InstallBackendAptdaemon.py (+30/-0)
UpdateManager/backend/__init__.py (+56/-0)
data/gtkbuilder/UpdateManager.ui (+44/-105)
debian/changelog (+133/-0)
debian/control (+3/-0)
hwe-support-status (+5/-0)
tests/test_backend_error.py (+36/-0)
tests/test_hwe_support_status.py (+8/-0)
tests/test_meta_release_core.py (+22/-0)
tests/test_pep8.py (+42/-0)
tests/test_proxy.py (+31/-0)
tests/test_update_error.py (+8/-0)
Conflict in HweSupportStatus/consts.py
Conflict in UpdateManager/Core/MetaRelease.py
Conflict in UpdateManager/Core/UpdateList.py
Conflict in UpdateManager/Core/utils.py
Conflict in UpdateManager/Dialogs.py
Conflict in UpdateManager/UpdateManager.py
Conflict in UpdateManager/UpdateManagerVersion.py
Conflict in UpdateManager/UpdatesAvailable.py
Conflict in UpdateManager/backend/InstallBackendAptdaemon.py
Conflict in UpdateManager/backend/__init__.py
Conflict in debian/changelog
Conflict in debian/control
Conflict in hwe-support-status
Conflict in tests/test_backend_error.py
Conflict in tests/test_hwe_support_status.py
Conflict in tests/test_meta_release_core.py
Conflict in tests/test_pep8.py
Conflict in tests/test_proxy.py
Conflict in tests/test_pycodestyle.py
Conflict in tests/test_update_error.py
Reviewer Review Type Date Requested Status
Elio Qoshi Pending
Sebastien Bacher Pending
Review via email: mp+446967@code.launchpad.net

Description of the change

Implement the redesign of Ubuntu Pro in Update Manager.

PPA: https://launchpad.net/~nteodosio/+archive/ubuntu/ubuntu-pro/+packages

Still doesn't display Ubuntu Pro packages as such when already attached, rather they're listed as normal updates.

Main differences are:

    - Fuse the description and changes tabs into a single view, which is
      now separated with a GtkPaned widget from the tree widget above.
    - Add button to attach to enable Ubuntu Pro if it is the only action
      available.
    - Ubuntu base -> System components.
    - Fix Ubuntu Pro item not being a parent group of its corresponding
      packages.

To post a comment you must log in.

Unmerged commits

aa9b49f... by Nathan Teodosio

Add gitignore file.

2a11578... by Nathan Teodosio

Update change log.

bd22c4a... by Nathan Teodosio

Implement the new Ubuntu Pro design.

- Fuse the description and changes tabs into a single view.
- Add button to attach to enable Ubuntu Pro if it is the only action
  available.
- Ubuntu base -> System components.
- Fix Ubuntu Pro item not being a parent group of its corresponding
  packages.

48d6735... by Robert Ancell

releasing package update-manager version 1:18.04.11.17

1ab7416... by Robert Ancell

Fix Ubuntu Pro updates checkbox and expander widget from overlapping

67a1fd6... by Sebastien Bacher

releasing package update-manager version 1:18.04.11.16

1a006d9... by Sebastien Bacher

Update of the parsing for pro client changes (lp: #1990450)

b181652... by Robert Ancell

Show pending Ubuntu pro packages (LP: #1990450)

1f906b8... by Brian Murray

tests/test_meta_release_core.py: switch a test from using lucid to bionic as precise was removed from the archive. (LP: #1929865)

9dbf545... by Brian Murray

UpdateManager/UpdateManager.py: when refreshing the cache and encountering an error return rather than trying to use the undefined cache which causes crashes. Additionally, don't present the dialog with a "Try Again" button which won't do anything. (LP: #1826213)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/.gitignore b/.gitignore
0new file mode 1006440new file mode 100644
index 0000000..0370a5e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
1tags
2__pycache__
diff --git a/HweSupportStatus/consts.py b/HweSupportStatus/consts.py
index 433b5b5..9dd7c56 100644
--- a/HweSupportStatus/consts.py
+++ b/HweSupportStatus/consts.py
@@ -6,6 +6,7 @@ from gettext import gettext as _
66
77
8# the day on which the short support HWE stack goes EoL8# the day on which the short support HWE stack goes EoL
9<<<<<<< HweSupportStatus/consts.py
9HWE_EOL_DATE = datetime.date(2027, 4, 30)10HWE_EOL_DATE = datetime.date(2027, 4, 30)
1011
11# the day on which the next LTS first point release is available12# the day on which the next LTS first point release is available
@@ -14,6 +15,16 @@ NEXT_LTS_DOT1_DATE = datetime.date(2024, 7, 15)
1415
15# end of the month in which this LTS goes EoL16# end of the month in which this LTS goes EoL
16LTS_EOL_DATE = datetime.date(2027, 4, 30)17LTS_EOL_DATE = datetime.date(2027, 4, 30)
18=======
19HWE_EOL_DATE = datetime.date(2023, 4, 30)
20
21# the day on which the next LTS first point release is available
22# used to propose a release upgrade
23NEXT_LTS_DOT1_DATE = datetime.date(2020, 7, 21)
24
25# end of the month in which this LTS goes EoL
26LTS_EOL_DATE = datetime.date(2023, 4, 30)
27>>>>>>> HweSupportStatus/consts.py
1728
1829
19class Messages:30class Messages:
@@ -33,7 +44,11 @@ in the Dash.
33 """44 """
34To upgrade to a supported (or longer-supported) configuration:45To upgrade to a supported (or longer-supported) configuration:
3546
47<<<<<<< HweSupportStatus/consts.py
36* Upgrade from Ubuntu 20.04 LTS to Ubuntu 22.04 LTS by running:48* Upgrade from Ubuntu 20.04 LTS to Ubuntu 22.04 LTS by running:
49=======
50* Upgrade from Ubuntu 16.04 LTS to Ubuntu 18.04 LTS by running:
51>>>>>>> HweSupportStatus/consts.py
37sudo do-release-upgrade %s52sudo do-release-upgrade %s
3853
39OR54OR
@@ -69,6 +84,7 @@ on %s. After this date security updates for critical parts (kernel
69and graphics stack) of your system will no longer be available.84and graphics stack) of your system will no longer be available.
7085
71For more information, please see:86For more information, please see:
87<<<<<<< HweSupportStatus/consts.py
72http://wiki.ubuntu.com/2204_HWE_EOL88http://wiki.ubuntu.com/2204_HWE_EOL
73"""89"""
74 )90 )
@@ -85,3 +101,13 @@ Stack ended on %s:
85 )101 )
86 % HWE_EOL_DATE.isoformat()102 % HWE_EOL_DATE.isoformat()
87 )103 )
104=======
105http://wiki.ubuntu.com/1604_HWE_EOL
106""") % HWE_EOL_DATE.isoformat()
107
108 HWE_SUPPORT_HAS_ENDED = _("""
109WARNING: Security updates for your current Hardware Enablement
110Stack ended on %s:
111 * http://wiki.ubuntu.com/1604_HWE_EOL
112""") % HWE_EOL_DATE.isoformat()
113>>>>>>> HweSupportStatus/consts.py
diff --git a/UpdateManager/Core/MetaRelease.py b/UpdateManager/Core/MetaRelease.py
index 9a485c4..ce90be0 100644
--- a/UpdateManager/Core/MetaRelease.py
+++ b/UpdateManager/Core/MetaRelease.py
@@ -155,13 +155,20 @@ class MetaReleaseCore(object):
155 return155 return
156 # now check which specific url to use156 # now check which specific url to use
157 if parser.has_option("DEFAULT", "Prompt"):157 if parser.has_option("DEFAULT", "Prompt"):
158<<<<<<< UpdateManager/Core/MetaRelease.py
158 prompt = parser.get("DEFAULT", "Prompt").lower()159 prompt = parser.get("DEFAULT", "Prompt").lower()
159 if prompt == "never" or prompt == "no":160 if prompt == "never" or prompt == "no":
160 self.prompt = "never"161 self.prompt = "never"
162=======
163 type = parser.get("DEFAULT", "Prompt").lower()
164 if (type == "never" or type == "no"):
165 self.prompt = 'never'
166>>>>>>> UpdateManager/Core/MetaRelease.py
161 # nothing to do for this object167 # nothing to do for this object
162 # FIXME: what about no longer supported?168 # FIXME: what about no longer supported?
163 self.downloaded.set()169 self.downloaded.set()
164 return170 return
171<<<<<<< UpdateManager/Core/MetaRelease.py
165 elif prompt == "lts":172 elif prompt == "lts":
166 self.prompt = "lts"173 self.prompt = "lts"
167 # the Prompt=lts setting only makes sense when running on174 # the Prompt=lts setting only makes sense when running on
@@ -174,6 +181,13 @@ class MetaReleaseCore(object):
174 self._debug("Prompt=lts for non-LTS, ignoring")181 self._debug("Prompt=lts for non-LTS, ignoring")
175 else:182 else:
176 self.prompt = "normal"183 self.prompt = "normal"
184=======
185 elif type == "lts":
186 self.prompt = 'lts'
187 self.METARELEASE_URI = self.METARELEASE_URI_LTS
188 else:
189 self.prompt = 'normal'
190>>>>>>> UpdateManager/Core/MetaRelease.py
177 # needed for the _tryUpgradeSelf() code in DistUpgradeController191 # needed for the _tryUpgradeSelf() code in DistUpgradeController
178 if forceLTS:192 if forceLTS:
179 self.METARELEASE_URI = self.METARELEASE_URI_LTS193 self.METARELEASE_URI = self.METARELEASE_URI_LTS
diff --git a/UpdateManager/Core/UpdateList.py b/UpdateManager/Core/UpdateList.py
index 80b900b..d902561 100644
--- a/UpdateManager/Core/UpdateList.py
+++ b/UpdateManager/Core/UpdateList.py
@@ -43,7 +43,11 @@ from gi.repository import Gio
43from UpdateManager.Core import utils43from UpdateManager.Core import utils
4444
4545
46<<<<<<< UpdateManager/Core/UpdateList.py
46class UpdateItem:47class UpdateItem:
48=======
49class UpdateItem():
50>>>>>>> UpdateManager/Core/UpdateList.py
47 def __init__(self, pkg, name, icon, to_remove, sensitive=True):51 def __init__(self, pkg, name, icon, to_remove, sensitive=True):
48 self.icon = icon52 self.icon = icon
49 self.name = name53 self.name = name
@@ -76,6 +80,7 @@ class UpdateGroup(UpdateItem):
76 all_items.extend(self._items)80 all_items.extend(self._items)
77 return sorted(all_items, key=lambda a: a.name.lower())81 return sorted(all_items, key=lambda a: a.name.lower())
7882
83<<<<<<< UpdateManager/Core/UpdateList.py
79 def add(84 def add(
80 self,85 self,
81 pkg,86 pkg,
@@ -84,6 +89,10 @@ class UpdateGroup(UpdateItem):
84 to_remove=False,89 to_remove=False,
85 sensitive=True,90 sensitive=True,
86 ):91 ):
92=======
93 def add(self, pkg, cache=None, eventloop_callback=None, to_remove=False,
94 sensitive=True):
95>>>>>>> UpdateManager/Core/UpdateList.py
87 name = utils.get_package_label(pkg)96 name = utils.get_package_label(pkg)
88 icon = Gio.ThemedIcon.new("package")97 icon = Gio.ThemedIcon.new("package")
89 self._items.add(UpdateItem(pkg, name, icon, to_remove, sensitive))98 self._items.add(UpdateItem(pkg, name, icon, to_remove, sensitive))
@@ -168,18 +177,28 @@ class UpdateApplicationGroup(UpdateGroup):
168 def __init__(self, pkg, application, to_remove, sensitive=True):177 def __init__(self, pkg, application, to_remove, sensitive=True):
169 name = application.get_display_name()178 name = application.get_display_name()
170 icon = application.get_icon()179 icon = application.get_icon()
180<<<<<<< UpdateManager/Core/UpdateList.py
171 super(UpdateApplicationGroup, self).__init__(181 super(UpdateApplicationGroup, self).__init__(
172 pkg, name, icon, to_remove, sensitive182 pkg, name, icon, to_remove, sensitive
173 )183 )
184=======
185 super(UpdateApplicationGroup, self).__init__(pkg, name, icon,
186 to_remove, sensitive)
187>>>>>>> UpdateManager/Core/UpdateList.py
174188
175189
176class UpdatePackageGroup(UpdateGroup):190class UpdatePackageGroup(UpdateGroup):
177 def __init__(self, pkg, to_remove, sensitive=True):191 def __init__(self, pkg, to_remove, sensitive=True):
178 name = utils.get_package_label(pkg)192 name = utils.get_package_label(pkg)
179 icon = Gio.ThemedIcon.new("package")193 icon = Gio.ThemedIcon.new("package")
194<<<<<<< UpdateManager/Core/UpdateList.py
180 super(UpdatePackageGroup, self).__init__(195 super(UpdatePackageGroup, self).__init__(
181 pkg, name, icon, to_remove, sensitive196 pkg, name, icon, to_remove, sensitive
182 )197 )
198=======
199 super(UpdatePackageGroup, self).__init__(pkg, name, icon, to_remove,
200 sensitive)
201>>>>>>> UpdateManager/Core/UpdateList.py
183202
184203
185class UpdateSystemGroup(UpdateGroup):204class UpdateSystemGroup(UpdateGroup):
@@ -188,9 +207,14 @@ class UpdateSystemGroup(UpdateGroup):
188 # the core components and packages.207 # the core components and packages.
189 name = _("%s base") % utils.get_ubuntu_flavor_name(cache=cache)208 name = _("%s base") % utils.get_ubuntu_flavor_name(cache=cache)
190 icon = Gio.ThemedIcon.new("distributor-logo")209 icon = Gio.ThemedIcon.new("distributor-logo")
210<<<<<<< UpdateManager/Core/UpdateList.py
191 super(UpdateSystemGroup, self).__init__(211 super(UpdateSystemGroup, self).__init__(
192 None, name, icon, to_remove, sensitive212 None, name, icon, to_remove, sensitive
193 )213 )
214=======
215 super(UpdateSystemGroup, self).__init__(None, name, icon, to_remove,
216 sensitive)
217>>>>>>> UpdateManager/Core/UpdateList.py
194218
195219
196class UpdateOrigin:220class UpdateOrigin:
@@ -233,7 +257,10 @@ class UpdateList:
233 self.update_groups = []257 self.update_groups = []
234 self.security_groups = []258 self.security_groups = []
235 self.kernel_autoremove_groups = []259 self.kernel_autoremove_groups = []
260<<<<<<< UpdateManager/Core/UpdateList.py
236 self.duplicate_groups = []261 self.duplicate_groups = []
262=======
263>>>>>>> UpdateManager/Core/UpdateList.py
237 self.ubuntu_pro_groups = []264 self.ubuntu_pro_groups = []
238 self.num_updates = 0265 self.num_updates = 0
239 self.random = random.Random()266 self.random = random.Random()
@@ -423,9 +450,50 @@ class UpdateList:
423 return True450 return True
424 return False451 return False
425452
453<<<<<<< UpdateManager/Core/UpdateList.py
426 def _make_groups(454 def _make_groups(
427 self, cache, pkgs, eventloop_callback, to_remove=False, sensitive=True455 self, cache, pkgs, eventloop_callback, to_remove=False, sensitive=True
428 ):456 ):
457=======
458 def _get_linux_packages(self):
459 "Return all binary packages made by the linux-meta source package"
460 # Hard code this rather than generate from source info in cache because
461 # that might only be available if we have deb-src lines. I think we
462 # could also generate it by iterating over all the binary package info
463 # we have, but that is costly. These don't change often.
464 return ['linux',
465 'linux-cloud-tools-generic',
466 'linux-cloud-tools-lowlatency',
467 'linux-cloud-tools-virtual',
468 'linux-crashdump',
469 'linux-generic',
470 'linux-generic-lpae',
471 'linux-headers-generic',
472 'linux-headers-generic-lpae',
473 'linux-headers-lowlatency',
474 'linux-headers-lowlatency-lpae',
475 'linux-headers-server',
476 'linux-headers-virtual',
477 'linux-image',
478 'linux-image-extra-virtual',
479 'linux-image-generic',
480 'linux-image-generic-lpae',
481 'linux-image-lowlatency',
482 'linux-image-virtual',
483 'linux-lowlatency',
484 'linux-signed-generic',
485 'linux-signed-image-generic',
486 'linux-signed-image-lowlatency',
487 'linux-signed-lowlatency',
488 'linux-source',
489 'linux-tools-generic',
490 'linux-tools-generic-lpae',
491 'linux-tools-lowlatency',
492 'linux-tools-virtual',
493 'linux-virtual']
494
495 def _make_groups(self, cache, pkgs, eventloop_callback, to_remove=False, sensitive=True):
496>>>>>>> UpdateManager/Core/UpdateList.py
429 if not pkgs:497 if not pkgs:
430 return []498 return []
431 ungrouped_pkgs = []499 ungrouped_pkgs = []
@@ -435,9 +503,13 @@ class UpdateList:
435 for pkg in pkgs:503 for pkg in pkgs:
436 app = self._get_application_for_package(pkg)504 app = self._get_application_for_package(pkg)
437 if app is not None:505 if app is not None:
506<<<<<<< UpdateManager/Core/UpdateList.py
438 app_group = UpdateApplicationGroup(507 app_group = UpdateApplicationGroup(
439 pkg, app, to_remove, sensitive508 pkg, app, to_remove, sensitive
440 )509 )
510=======
511 app_group = UpdateApplicationGroup(pkg, app, to_remove, sensitive)
512>>>>>>> UpdateManager/Core/UpdateList.py
441 app_groups.append(app_group)513 app_groups.append(app_group)
442 else:514 else:
443 ungrouped_pkgs.append(pkg)515 ungrouped_pkgs.append(pkg)
@@ -458,6 +530,7 @@ class UpdateList:
458 if ungrouped_pkgs:530 if ungrouped_pkgs:
459 # Separate out system base packages. If we have already found an531 # Separate out system base packages. If we have already found an
460 # application for all updates, don't bother.532 # application for all updates, don't bother.
533<<<<<<< UpdateManager/Core/UpdateList.py
461 linux_names = (534 linux_names = (
462 "linux$",535 "linux$",
463 "linux-.*-buildinfo.*",536 "linux-.*-buildinfo.*",
@@ -482,6 +555,9 @@ class UpdateList:
482 ubuntu_base_group = UpdateGroup(555 ubuntu_base_group = UpdateGroup(
483 None, None, None, to_remove, sensitive556 None, None, None, to_remove, sensitive
484 )557 )
558=======
559 meta_group = UpdateGroup(None, None, None, to_remove, sensitive)
560>>>>>>> UpdateManager/Core/UpdateList.py
485 flavor_package = utils.get_ubuntu_flavor_package(cache=cache)561 flavor_package = utils.get_ubuntu_flavor_package(cache=cache)
486 ubuntu_base_pkgs = [562 ubuntu_base_pkgs = [
487 flavor_package,563 flavor_package,
@@ -502,6 +578,7 @@ class UpdateList:
502 pkg, cache, eventloop_callback578 pkg, cache, eventloop_callback
503 ):579 ):
504 if system_group is None:580 if system_group is None:
581<<<<<<< UpdateManager/Core/UpdateList.py
505 system_group = UpdateSystemGroup(582 system_group = UpdateSystemGroup(
506 cache, to_remove, sensitive583 cache, to_remove, sensitive
507 )584 )
@@ -510,6 +587,12 @@ class UpdateList:
510 pkg_groups.append(587 pkg_groups.append(
511 UpdatePackageGroup(pkg, to_remove, sensitive)588 UpdatePackageGroup(pkg, to_remove, sensitive)
512 )589 )
590=======
591 system_group = UpdateSystemGroup(cache, to_remove, sensitive)
592 system_group.add(pkg)
593 else:
594 pkg_groups.append(UpdatePackageGroup(pkg, to_remove, sensitive))
595>>>>>>> UpdateManager/Core/UpdateList.py
513596
514 app_groups.sort(key=lambda a: a.name.lower())597 app_groups.sort(key=lambda a: a.name.lower())
515 pkg_groups.sort(key=lambda a: a.name.lower())598 pkg_groups.sort(key=lambda a: a.name.lower())
@@ -518,6 +601,7 @@ class UpdateList:
518601
519 return app_groups + pkg_groups602 return app_groups + pkg_groups
520603
604<<<<<<< UpdateManager/Core/UpdateList.py
521 def update(605 def update(
522 self,606 self,
523 cache,607 cache,
@@ -525,6 +609,9 @@ class UpdateList:
525 duplicate_packages=[],609 duplicate_packages=[],
526 ua_security_packages=[],610 ua_security_packages=[],
527 ):611 ):
612=======
613 def update(self, cache, eventloop_callback=None, ua_security_packages=[]):
614>>>>>>> UpdateManager/Core/UpdateList.py
528 self.held_back = []615 self.held_back = []
529616
530 # do the upgrade617 # do the upgrade
@@ -569,6 +656,36 @@ class UpdateList:
569 FakeUbuntuProPackage(package_name, version, size)656 FakeUbuntuProPackage(package_name, version, size)
570 )657 )
571658
659 class FakeUbuntuProPackageCandidate:
660 def __init__(self, source_name, version, size):
661 self.source_name = source_name
662 self.summary = source_name
663 self.description = source_name
664 self.version = version
665 self.size = size
666 self.downloadable = False
667 self.record = {}
668
669 class FakeUbuntuProPackage:
670 def __init__(self, package_name, version, size):
671 self.name = package_name
672 self.candidate = FakeUbuntuProPackageCandidate(package_name,
673 version, size)
674 self.marked_install = False
675 self.marked_upgrade = False
676 self.marked_delete = False
677 self.installed_files = []
678
679 def mark_install(self):
680 pass
681
682 def mark_delete(self):
683 pass
684 fake_ua_packages = []
685 for (package_name, version, size) in ua_security_packages:
686 fake_ua_packages.append(FakeUbuntuProPackage(package_name,
687 version, size))
688
572 # Find all upgradable packages689 # Find all upgradable packages
573 for pkg in cache:690 for pkg in cache:
574 if pkg.is_upgradable or pkg.marked_install:691 if pkg.is_upgradable or pkg.marked_install:
@@ -609,15 +726,21 @@ class UpdateList:
609 and not cache.running_kernel_pkgs_regexp.match(pkg.name)726 and not cache.running_kernel_pkgs_regexp.match(pkg.name)
610 ):727 ):
611 kernel_autoremove_pkgs.append(pkg)728 kernel_autoremove_pkgs.append(pkg)
729<<<<<<< UpdateManager/Core/UpdateList.py
612 if pkg.name in duplicate_packages:730 if pkg.name in duplicate_packages:
613 duplicate_pkgs.append(pkg)731 duplicate_pkgs.append(pkg)
732=======
733>>>>>>> UpdateManager/Core/UpdateList.py
614734
615 # perform operations after the loop to not skip packages which735 # perform operations after the loop to not skip packages which
616 # changed state due to the resolver736 # changed state due to the resolver
617 for pkg in kernel_autoremove_pkgs:737 for pkg in kernel_autoremove_pkgs:
618 pkg.mark_delete()738 pkg.mark_delete()
739<<<<<<< UpdateManager/Core/UpdateList.py
619 for pkg in duplicate_pkgs:740 for pkg in duplicate_pkgs:
620 pkg.mark_delete()741 pkg.mark_delete()
742=======
743>>>>>>> UpdateManager/Core/UpdateList.py
621 for pkg in self.ignored_phased_updates:744 for pkg in self.ignored_phased_updates:
622 pkg.mark_keep()745 pkg.mark_keep()
623746
@@ -641,6 +764,7 @@ class UpdateList:
641 cache, security_pkgs, eventloop_callback764 cache, security_pkgs, eventloop_callback
642 )765 )
643 self.kernel_autoremove_groups = self._make_groups(766 self.kernel_autoremove_groups = self._make_groups(
767<<<<<<< UpdateManager/Core/UpdateList.py
644 cache, kernel_autoremove_pkgs, eventloop_callback, True768 cache, kernel_autoremove_pkgs, eventloop_callback, True
645 )769 )
646 self.duplicate_groups = self._make_groups(770 self.duplicate_groups = self._make_groups(
@@ -649,3 +773,8 @@ class UpdateList:
649 self.ubuntu_pro_groups = self._make_groups(773 self.ubuntu_pro_groups = self._make_groups(
650 cache, fake_ua_packages, eventloop_callback, sensitive=False774 cache, fake_ua_packages, eventloop_callback, sensitive=False
651 )775 )
776=======
777 cache, kernel_autoremove_pkgs, eventloop_callback, True)
778 self.ubuntu_pro_groups = self._make_groups(
779 cache, fake_ua_packages, eventloop_callback, sensitive=False)
780>>>>>>> UpdateManager/Core/UpdateList.py
diff --git a/UpdateManager/Core/utils.py b/UpdateManager/Core/utils.py
index 3ca01cd..de22382 100644
--- a/UpdateManager/Core/utils.py
+++ b/UpdateManager/Core/utils.py
@@ -234,10 +234,15 @@ def url_downloadable(uri, debug_func=None):
234 lambda x: True234 lambda x: True
235 debug_func("url_downloadable: %s" % uri)235 debug_func("url_downloadable: %s" % uri)
236 (scheme, netloc, path, querry, fragment) = urlsplit(uri)236 (scheme, netloc, path, querry, fragment) = urlsplit(uri)
237<<<<<<< UpdateManager/Core/utils.py
237 debug_func(238 debug_func(
238 "s='%s' n='%s' p='%s' q='%s' f='%s'"239 "s='%s' n='%s' p='%s' q='%s' f='%s'"
239 % (scheme, netloc, path, querry, fragment)240 % (scheme, netloc, path, querry, fragment)
240 )241 )
242=======
243 debug_func("s='%s' n='%s' p='%s' q='%s' f='%s'" % (scheme, netloc, path,
244 querry, fragment))
245>>>>>>> UpdateManager/Core/utils.py
241 if scheme in ("http", "https"):246 if scheme in ("http", "https"):
242 try:247 try:
243 http_file = urlopen(HeadRequest(uri))248 http_file = urlopen(HeadRequest(uri))
@@ -279,7 +284,11 @@ def init_proxy(gsettings=None):
279 SYNAPTIC_CONF_FILE = "/root/.synaptic/synaptic.conf"284 SYNAPTIC_CONF_FILE = "/root/.synaptic/synaptic.conf"
280 proxies = {}285 proxies = {}
281 # generic apt config wins286 # generic apt config wins
287<<<<<<< UpdateManager/Core/utils.py
282 if apt_pkg.config.find("Acquire::http::Proxy") != "":288 if apt_pkg.config.find("Acquire::http::Proxy") != "":
289=======
290 if apt_pkg.config.find("Acquire::http::Proxy") != '':
291>>>>>>> UpdateManager/Core/utils.py
283 proxies["http"] = apt_pkg.config.find("Acquire::http::Proxy")292 proxies["http"] = apt_pkg.config.find("Acquire::http::Proxy")
284 # then synaptic293 # then synaptic
285 elif os.path.exists(SYNAPTIC_CONF_FILE):294 elif os.path.exists(SYNAPTIC_CONF_FILE):
@@ -291,7 +300,11 @@ def init_proxy(gsettings=None):
291 proxy_port = str(cnf.find_i("Synaptic::httpProxyPort"))300 proxy_port = str(cnf.find_i("Synaptic::httpProxyPort"))
292 if proxy_host and proxy_port:301 if proxy_host and proxy_port:
293 proxies["http"] = "http://%s:%s/" % (proxy_host, proxy_port)302 proxies["http"] = "http://%s:%s/" % (proxy_host, proxy_port)
303<<<<<<< UpdateManager/Core/utils.py
294 if apt_pkg.config.find("Acquire::https::Proxy") != "":304 if apt_pkg.config.find("Acquire::https::Proxy") != "":
305=======
306 if apt_pkg.config.find("Acquire::https::Proxy") != '':
307>>>>>>> UpdateManager/Core/utils.py
295 proxies["https"] = apt_pkg.config.find("Acquire::https::Proxy")308 proxies["https"] = apt_pkg.config.find("Acquire::https::Proxy")
296 elif "http" in proxies:309 elif "http" in proxies:
297 proxies["https"] = proxies["http"]310 proxies["https"] = proxies["http"]
@@ -299,7 +312,11 @@ def init_proxy(gsettings=None):
299 if proxies:312 if proxies:
300 # basic verification313 # basic verification
301 for proxy in proxies.values():314 for proxy in proxies.values():
315<<<<<<< UpdateManager/Core/utils.py
302 if not re.match("https?://\\w+", proxy):316 if not re.match("https?://\\w+", proxy):
317=======
318 if not re.match("https?://\w+", proxy):
319>>>>>>> UpdateManager/Core/utils.py
303 print("proxy '%s' looks invalid" % proxy, file=sys.stderr)320 print("proxy '%s' looks invalid" % proxy, file=sys.stderr)
304 return321 return
305 proxy_support = ProxyHandler(proxies)322 proxy_support = ProxyHandler(proxies)
diff --git a/UpdateManager/Dialogs.py b/UpdateManager/Dialogs.py
index 304609c..5f3f9af 100644
--- a/UpdateManager/Dialogs.py
+++ b/UpdateManager/Dialogs.py
@@ -107,6 +107,7 @@ class InternalDialog(BuilderDialog):
107 self.connect("realize", self._on_realize)107 self.connect("realize", self._on_realize)
108108
109 def _on_realize(self, user_data):109 def _on_realize(self, user_data):
110 self.paned.set_position(self.paned.get_allocation().height * 0.6)
110 if self.focus_button:111 if self.focus_button:
111 self.focus_button.set_can_default(True)112 self.focus_button.set_can_default(True)
112 self.focus_button.set_can_focus(True)113 self.focus_button.set_can_focus(True)
@@ -131,7 +132,7 @@ class InternalDialog(BuilderDialog):
131 return None132 return None
132133
133 def on_settings_button_clicked(self):134 def on_settings_button_clicked(self):
134 self.window_main.show_settings()135 self.window_main.show_settings(2)
135136
136 def set_header(self, label):137 def set_header(self, label):
137 if label:138 if label:
@@ -159,6 +160,7 @@ class InternalDialog(BuilderDialog):
159 self.set_desc(None)160 self.set_desc(None)
160161
161 if not active:162 if not active:
163<<<<<<< UpdateManager/Dialogs.py
162 if (164 if (
163 self._is_livepatch_supported()165 self._is_livepatch_supported()
164 and self.settings_button166 and self.settings_button
@@ -171,6 +173,14 @@ class InternalDialog(BuilderDialog):
171 "secure between restarts."173 "secure between restarts."
172 )174 )
173 )175 )
176=======
177 if self._is_livepatch_supported() and \
178 self.settings_button and \
179 self.settings.get_int('launch-count') >= 4:
180 self.set_desc(_("<b>Tip:</b> You can use Livepatch with "
181 "Ubuntu Pro to keep your computer more "
182 "secure between restarts."))
183>>>>>>> UpdateManager/Dialogs.py
174 self.settings_button.set_label(_("Settings & Pro…"))184 self.settings_button.set_label(_("Settings & Pro…"))
175 return185 return
176186
@@ -236,9 +246,14 @@ class NoUpdatesDialog(InternalDialog):
236 else:246 else:
237 self.set_header(_("The software on this computer is up to date."))247 self.set_header(_("The software on this computer is up to date."))
238 self.settings_button = self.add_settings_button()248 self.settings_button = self.add_settings_button()
249<<<<<<< UpdateManager/Dialogs.py
239 self.focus_button = self.add_button(250 self.focus_button = self.add_button(
240 Gtk.STOCK_OK, self.window_main.close251 Gtk.STOCK_OK, self.window_main.close
241 )252 )
253=======
254 self.focus_button = self.add_button(Gtk.STOCK_OK,
255 self.window_main.close)
256>>>>>>> UpdateManager/Dialogs.py
242 self.check_livepatch_status()257 self.check_livepatch_status()
243258
244259
@@ -326,6 +341,7 @@ class NoUpgradeForYouDialog(InternalDialog):
326 InternalDialog.__init__(self, window_main)341 InternalDialog.__init__(self, window_main)
327 self.set_header(_("Sorry, there are no more upgrades for this system"))342 self.set_header(_("Sorry, there are no more upgrades for this system"))
328 # Translators: this is an Ubuntu version name like "Ubuntu 12.04"343 # Translators: this is an Ubuntu version name like "Ubuntu 12.04"
344<<<<<<< UpdateManager/Dialogs.py
329 self.set_desc(345 self.set_desc(
330 _(346 _(
331 "\nThere will not be any further Ubuntu releases "347 "\nThere will not be any further Ubuntu releases "
@@ -339,6 +355,17 @@ class NoUpgradeForYouDialog(InternalDialog):
339 self.focus_button = self.add_button(355 self.focus_button = self.add_button(
340 Gtk.STOCK_OK, self.window_main.close356 Gtk.STOCK_OK, self.window_main.close
341 )357 )
358=======
359 self.set_desc(_("\nThere will not be any further Ubuntu releases "
360 "for this system's '%s' architecture.\n\n"
361 "Updates for Ubuntu %s will continue until "
362 "2023-04-26.\n\nIf you reinstall Ubuntu from "
363 "ubuntu.com/download, future upgrades will "
364 "be available.") %
365 (arch, meta_release.current_dist_version))
366 self.focus_button = self.add_button(Gtk.STOCK_OK,
367 self.window_main.close)
368>>>>>>> UpdateManager/Dialogs.py
342369
343370
344class PartialUpgradeDialog(InternalDialog):371class PartialUpgradeDialog(InternalDialog):
diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py
index 6dcdab6..780c587 100644
--- a/UpdateManager/UpdateManager.py
+++ b/UpdateManager/UpdateManager.py
@@ -35,7 +35,11 @@ warnings.filterwarnings(
35)35)
3636
37import distro_info37import distro_info
38<<<<<<< UpdateManager/UpdateManager.py
38import fnmatch39import fnmatch
40=======
41import json
42>>>>>>> UpdateManager/UpdateManager.py
39import os43import os
40import subprocess44import subprocess
41import sys45import sys
@@ -50,6 +54,7 @@ from dbus.mainloop.glib import DBusGMainLoop
50DBusGMainLoop(set_as_default=True)54DBusGMainLoop(set_as_default=True)
5155
52from .UnitySupport import UnitySupport56from .UnitySupport import UnitySupport
57<<<<<<< UpdateManager/UpdateManager.py
53from .Dialogs import (58from .Dialogs import (
54 DistUpgradeDialog,59 DistUpgradeDialog,
55 ErrorDialog,60 ErrorDialog,
@@ -62,6 +67,18 @@ from .Dialogs import (
62 UnsupportedDialog,67 UnsupportedDialog,
63 UpdateErrorDialog,68 UpdateErrorDialog,
64)69)
70=======
71from .Dialogs import (DistUpgradeDialog,
72 ErrorDialog,
73 HWEUpgradeDialog,
74 NeedRestartDialog,
75 NoUpdatesDialog,
76 NoUpgradeForYouDialog,
77 PartialUpgradeDialog,
78 StoppedUpdatesDialog,
79 UnsupportedDialog,
80 UpdateErrorDialog)
81>>>>>>> UpdateManager/UpdateManager.py
65from .MetaReleaseGObject import MetaRelease82from .MetaReleaseGObject import MetaRelease
66from .UpdatesAvailable import UpdatesAvailable83from .UpdatesAvailable import UpdatesAvailable
67from .Core.AlertWatcher import AlertWatcher84from .Core.AlertWatcher import AlertWatcher
@@ -69,7 +86,12 @@ from .Core.MyCache import MyCache
69from .Core.roam import NetworkManagerHelper86from .Core.roam import NetworkManagerHelper
70from .Core.UpdateList import UpdateList87from .Core.UpdateList import UpdateList
71from .Core.utils import get_arch, get_dist88from .Core.utils import get_arch, get_dist
89<<<<<<< UpdateManager/UpdateManager.py
72from .backend import InstallBackend, get_backend90from .backend import InstallBackend, get_backend
91=======
92from .backend import (InstallBackend,
93 get_backend)
94>>>>>>> UpdateManager/UpdateManager.py
7395
74# file that signals if we need to reboot96# file that signals if we need to reboot
75REBOOT_REQUIRED_FILE = "/var/run/reboot-required"97REBOOT_REQUIRED_FILE = "/var/run/reboot-required"
@@ -92,8 +114,11 @@ class UpdateManager(Gtk.Window):
92 self.update_list = None114 self.update_list = None
93 self.meta_release = None115 self.meta_release = None
94 self.hwe_replacement_packages = None116 self.hwe_replacement_packages = None
117<<<<<<< UpdateManager/UpdateManager.py
95 self.oem_metapackages = set()118 self.oem_metapackages = set()
96 self.duplicate_packages = []119 self.duplicate_packages = []
120=======
121>>>>>>> UpdateManager/UpdateManager.py
97 self.arch = get_arch()122 self.arch = get_arch()
98123
99 # Basic GTK+ parameters124 # Basic GTK+ parameters
@@ -103,9 +128,15 @@ class UpdateManager(Gtk.Window):
103128
104 # Keep window at a constant size129 # Keep window at a constant size
105 ctx = self.get_style_context()130 ctx = self.get_style_context()
131<<<<<<< UpdateManager/UpdateManager.py
106 self.style_changed = ctx.connect(132 self.style_changed = ctx.connect(
107 "changed", lambda ctx: self.resize_to_standard_width()133 "changed", lambda ctx: self.resize_to_standard_width()
108 )134 )
135=======
136 self.style_changed = ctx.connect("changed",
137 lambda ctx:
138 self.resize_to_standard_width())
139>>>>>>> UpdateManager/UpdateManager.py
109140
110 # Signals141 # Signals
111 self.connect("delete-event", self._on_close)142 self.connect("delete-event", self._on_close)
@@ -202,8 +233,18 @@ class UpdateManager(Gtk.Window):
202 self._start_pane(None)233 self._start_pane(None)
203 sys.exit(0)234 sys.exit(0)
204235
236<<<<<<< UpdateManager/UpdateManager.py
205 def show_settings(self):237 def show_settings(self):
206 cmd = ["/usr/bin/software-properties-gtk", "--open-tab", "2"]238 cmd = ["/usr/bin/software-properties-gtk", "--open-tab", "2"]
239=======
240 def show_settings(self, page_number):
241 try:
242 apt_pkg.pkgsystem_unlock()
243 except SystemError:
244 pass
245 cmd = ["/usr/bin/software-properties-gtk",
246 "--open-tab", str(page_number)]
247>>>>>>> UpdateManager/UpdateManager.py
207248
208 if "WAYLAND_DISPLAY" not in os.environ:249 if "WAYLAND_DISPLAY" not in os.environ:
209 cmd += ["--toplevel", "%s" % self.get_window().get_xid()]250 cmd += ["--toplevel", "%s" % self.get_window().get_xid()]
@@ -246,6 +287,7 @@ class UpdateManager(Gtk.Window):
246 if self.cache is None:287 if self.cache is None:
247 return288 return
248289
290<<<<<<< UpdateManager/UpdateManager.py
249 pane = self._make_available_pane(291 pane = self._make_available_pane(
250 self.cache.install_count + self.cache.del_count,292 self.cache.install_count + self.cache.del_count,
251 os.path.exists(REBOOT_REQUIRED_FILE),293 os.path.exists(REBOOT_REQUIRED_FILE),
@@ -294,21 +336,38 @@ class UpdateManager(Gtk.Window):
294 cancelled_update=False,336 cancelled_update=False,
295 error_occurred=False,337 error_occurred=False,
296 ):338 ):
297 self._check_hwe_support_status()339=======
298 if install_count == 0:340 pane = self._make_available_pane(self.cache.install_count,
299 # Need Restart > New Release > No Updates341 os.path.exists(REBOOT_REQUIRED_FILE),
300 if need_reboot:342 cancelled_update, error_occurred)
301 return NeedRestartDialog(self)343 self._start_pane(pane)
302 dist_upgrade = self._check_meta_release()344
303 if dist_upgrade:345 def _get_ua_security_status(self):
304 return dist_upgrade346 self.ua_security_packages = []
305 elif cancelled_update:347 try:
306 return StoppedUpdatesDialog(self)348 p = subprocess.Popen(['pro', 'security-status', '--format=json'],
307 elif self.hwe_replacement_packages:349 stdout=subprocess.PIPE)
308 return HWEUpgradeDialog(self)350 except OSError:
309 else:351 pass
310 return NoUpdatesDialog(self, error_occurred=error_occurred)
311 else:352 else:
353 while p.poll() is None:
354 while Gtk.events_pending():
355 Gtk.main_iteration()
356 time.sleep(0.05)
357 s = json.load(p.stdout)
358 for package in s.get('packages', []):
359 status = package.get('status', '')
360 if status == 'pending_attach' or status == 'pending_enable':
361 name = package.get('package', '')
362 version = package.get('version', '')
363 size = package.get('download_size', 0)
364 self.ua_security_packages.append((name, version, size))
365
366 def _make_available_pane(self, install_count, need_reboot=False,
367 cancelled_update=False, error_occurred=False):
368>>>>>>> UpdateManager/UpdateManager.py
369 self._check_hwe_support_status()
370 if install_count != 0 or len(self.ua_security_packages) > 0:
312 header = None371 header = None
313 desc = None372 desc = None
314 if error_occurred:373 if error_occurred:
@@ -322,6 +381,19 @@ class UpdateManager(Gtk.Window):
322 elif self.hwe_replacement_packages:381 elif self.hwe_replacement_packages:
323 return HWEUpgradeDialog(self)382 return HWEUpgradeDialog(self)
324 return UpdatesAvailable(self, header, desc, need_reboot)383 return UpdatesAvailable(self, header, desc, need_reboot)
384 else:
385 # Need Restart > New Release > No Updates
386 if need_reboot:
387 return NeedRestartDialog(self)
388 dist_upgrade = self._check_meta_release()
389 if dist_upgrade:
390 return dist_upgrade
391 elif cancelled_update:
392 return StoppedUpdatesDialog(self)
393 elif self.hwe_replacement_packages:
394 return HWEUpgradeDialog(self)
395 else:
396 return NoUpdatesDialog(self, error_occurred=error_occurred)
325397
326 def start_error(self, update_and_retry, header, desc):398 def start_error(self, update_and_retry, header, desc):
327 if update_and_retry:399 if update_and_retry:
@@ -360,6 +432,7 @@ class UpdateManager(Gtk.Window):
360432
361 # Check for new fresh release433 # Check for new fresh release
362 settings = Gio.Settings.new("com.ubuntu.update-manager")434 settings = Gio.Settings.new("com.ubuntu.update-manager")
435<<<<<<< UpdateManager/UpdateManager.py
363 if self.meta_release.new_dist and (436 if self.meta_release.new_dist and (
364 self.options.check_dist_upgrades437 self.options.check_dist_upgrades
365 or settings.get_boolean("check-dist-upgrades")438 or settings.get_boolean("check-dist-upgrades")
@@ -368,6 +441,14 @@ class UpdateManager(Gtk.Window):
368 return NoUpgradeForYouDialog(441 return NoUpgradeForYouDialog(
369 self, self.meta_release, self.arch442 self, self.meta_release, self.arch
370 )443 )
444=======
445 if (self.meta_release.new_dist and
446 (self.options.check_dist_upgrades or
447 settings.get_boolean("check-dist-upgrades"))):
448 if self.arch == 'i386':
449 return NoUpgradeForYouDialog(self, self.meta_release,
450 self.arch)
451>>>>>>> UpdateManager/UpdateManager.py
371 return DistUpgradeDialog(self, self.meta_release)452 return DistUpgradeDialog(self, self.meta_release)
372453
373 return None454 return None
@@ -428,22 +509,37 @@ class UpdateManager(Gtk.Window):
428 self._start_pane(PartialUpgradeDialog(self))509 self._start_pane(PartialUpgradeDialog(self))
429 # we assert a clean cache510 # we assert a clean cache
430 header = _("Software index is broken")511 header = _("Software index is broken")
512<<<<<<< UpdateManager/UpdateManager.py
431 desc = _(513 desc = _(
432 "It is impossible to install or remove any software. "514 "It is impossible to install or remove any software. "
433 'Please use the package manager "Synaptic" or run '515 'Please use the package manager "Synaptic" or run '
434 '"sudo apt-get install -f" in a terminal to fix '516 '"sudo apt-get install -f" in a terminal to fix '
435 "this issue at first."517 "this issue at first."
436 )518 )
519=======
520 desc = _("It is impossible to install or remove any software. "
521 "Please use the package manager \"Synaptic\" or run "
522 "\"sudo apt-get install -f\" in a terminal to fix "
523 "this issue at first.")
524>>>>>>> UpdateManager/UpdateManager.py
437 self.start_error(False, header, desc)525 self.start_error(False, header, desc)
438 return526 return
439 except SystemError as e:527 except SystemError as e:
440 header = _("Could not initialize the package information")528 header = _("Could not initialize the package information")
529<<<<<<< UpdateManager/UpdateManager.py
441 desc = _(530 desc = _(
442 "An unresolvable problem occurred while "531 "An unresolvable problem occurred while "
443 "initializing the package information.\n\n"532 "initializing the package information.\n\n"
444 "Please report this bug against the 'update-manager' "533 "Please report this bug against the 'update-manager' "
445 "package and include the following error message:\n"534 "package and include the following error message:\n"
446 ) + str(e)535 ) + str(e)
536=======
537 desc = _("An unresolvable problem occurred while "
538 "initializing the package information.\n\n"
539 "Please report this bug against the 'update-manager' "
540 "package and include the following error "
541 "message:\n") + str(e)
542>>>>>>> UpdateManager/UpdateManager.py
447 self.start_error(False, header, desc)543 self.start_error(False, header, desc)
448 return544 return
449545
@@ -454,6 +550,7 @@ class UpdateManager(Gtk.Window):
454550
455 iterate()551 iterate()
456552
553<<<<<<< UpdateManager/UpdateManager.py
457 self._check_oem_metapackages()554 self._check_oem_metapackages()
458555
459 self._get_ua_security_status()556 self._get_ua_security_status()
@@ -473,6 +570,15 @@ class UpdateManager(Gtk.Window):
473 duplicate_packages=self.duplicate_packages,570 duplicate_packages=self.duplicate_packages,
474 ua_security_packages=self.ua_security_packages,571 ua_security_packages=self.ua_security_packages,
475 )572 )
573=======
574 self._get_ua_security_status()
575
576 self.update_list = UpdateList(self)
577 try:
578 self.update_list.update(self.cache, eventloop_callback=iterate,
579 ua_security_packages=self.
580 ua_security_packages)
581>>>>>>> UpdateManager/UpdateManager.py
476 except SystemError as e:582 except SystemError as e:
477 header = _("Could not calculate the upgrade")583 header = _("Could not calculate the upgrade")
478 desc = _(584 desc = _(
diff --git a/UpdateManager/UpdateManagerVersion.py b/UpdateManager/UpdateManagerVersion.py
index 09c2fb6..2b23708 100644
--- a/UpdateManager/UpdateManagerVersion.py
+++ b/UpdateManager/UpdateManagerVersion.py
@@ -1,3 +1,7 @@
1<<<<<<< UpdateManager/UpdateManagerVersion.py
1# This file isn't used except in local checkouts, but one like it is written2# This file isn't used except in local checkouts, but one like it is written
2# out in the build directory by setup.py3# out in the build directory by setup.py
3VERSION = "bzr"4VERSION = "bzr"
5=======
6VERSION = '1:18.04.11.17'
7>>>>>>> UpdateManager/UpdateManagerVersion.py
diff --git a/UpdateManager/UpdatesAvailable.py b/UpdateManager/UpdatesAvailable.py
index e081e1f..6c16802 100644
--- a/UpdateManager/UpdatesAvailable.py
+++ b/UpdateManager/UpdatesAvailable.py
@@ -75,6 +75,7 @@ from .UnitySupport import UnitySupport
75# - screen reader does not say "Downloaded" for downloaded updates75# - screen reader does not say "Downloaded" for downloaded updates
7676
77# list constants77# list constants
78<<<<<<< UpdateManager/UpdatesAvailable.py
78(79(
79 LIST_NAME,80 LIST_NAME,
80 LIST_UPDATE_DATA,81 LIST_UPDATE_DATA,
@@ -82,6 +83,10 @@ from .UnitySupport import UnitySupport
82 LIST_TOGGLE_ACTIVE,83 LIST_TOGGLE_ACTIVE,
83 LIST_SENSITIVE,84 LIST_SENSITIVE,
84) = range(5)85) = range(5)
86=======
87(LIST_NAME, LIST_UPDATE_DATA, LIST_SIZE, LIST_TOGGLE_ACTIVE,
88 LIST_SENSITIVE) = range(5)
89>>>>>>> UpdateManager/UpdatesAvailable.py
8590
86# NetworkManager enums91# NetworkManager enums
87from .Core.roam import NetworkManagerHelper92from .Core.roam import NetworkManagerHelper
@@ -256,20 +261,32 @@ class UpdatesAvailable(InternalDialog):
256 # self.button_help.set_sensitive(False)261 # self.button_help.set_sensitive(False)
257262
258 self.add_settings_button()263 self.add_settings_button()
264<<<<<<< UpdateManager/UpdatesAvailable.py
259 self.button_close = self.add_button(265 self.button_close = self.add_button(
260 Gtk.STOCK_CANCEL, self.window_main.close266 Gtk.STOCK_CANCEL, self.window_main.close
261 )267 )
262 self.button_install = self.add_button(268 self.button_install = self.add_button(
263 _("Install Now"), self.on_button_install_clicked269 _("Install Now"), self.on_button_install_clicked
264 )270 )
271=======
272 self.button_close = self.add_button(Gtk.STOCK_CANCEL,
273 self.window_main.close)
274 self.button_pro = self.add_button(_("Enable Ubuntu Pro..."),
275 self.on_button_pro_clicked)
276 self.button_install = self.add_button(_("Install Now"),
277 self.on_button_install_clicked)
278>>>>>>> UpdateManager/UpdatesAvailable.py
265 self.focus_button = self.button_install279 self.focus_button = self.button_install
266280
267 # create text view281 # create text view
268 self.textview_changes = ChangelogViewer()282 self.textview_changes = ChangelogViewer()
283 self.textview_changes.set_wrap_mode(Gtk.WrapMode.WORD)
269 self.textview_changes.show()284 self.textview_changes.show()
270 self.scrolledwindow_changes.add(self.textview_changes)285 self.scrolledwindow_changes.add(self.textview_changes)
271 changes_buffer = self.textview_changes.get_buffer()286 changes_buffer = self.textview_changes.get_buffer()
272 changes_buffer.create_tag("versiontag", weight=Pango.Weight.BOLD)287 changes_buffer.create_tag("versiontag", weight=Pango.Weight.BOLD)
288 changes_buffer.create_tag("changestag", weight=Pango.Weight.BOLD)
289 changes_buffer.create_tag("descriptiontag", weight=Pango.Weight.BOLD)
273290
274 # the treeview (move into it's own code!)291 # the treeview (move into it's own code!)
275 self.store = Gtk.TreeStore(str, GObject.TYPE_PYOBJECT, str, bool, bool)292 self.store = Gtk.TreeStore(str, GObject.TYPE_PYOBJECT, str, bool, bool)
@@ -304,6 +321,7 @@ class UpdatesAvailable(InternalDialog):
304 pkg_toggle_renderer.set_property("ypad", 2)321 pkg_toggle_renderer.set_property("ypad", 2)
305 pkg_toggle_renderer.connect("toggled", self.on_update_toggled)322 pkg_toggle_renderer.connect("toggled", self.on_update_toggled)
306 pkg_column.pack_start(pkg_toggle_renderer, False)323 pkg_column.pack_start(pkg_toggle_renderer, False)
324<<<<<<< UpdateManager/UpdatesAvailable.py
307 pkg_column.add_attribute(325 pkg_column.add_attribute(
308 pkg_toggle_renderer, "active", LIST_TOGGLE_ACTIVE326 pkg_toggle_renderer, "active", LIST_TOGGLE_ACTIVE
309 )327 )
@@ -313,6 +331,14 @@ class UpdatesAvailable(InternalDialog):
313 pkg_column.set_cell_data_func(331 pkg_column.set_cell_data_func(
314 pkg_toggle_renderer, self.pkg_toggle_renderer_data_func332 pkg_toggle_renderer, self.pkg_toggle_renderer_data_func
315 )333 )
334=======
335 pkg_column.add_attribute(pkg_toggle_renderer,
336 'active', LIST_TOGGLE_ACTIVE)
337 pkg_column.add_attribute(pkg_toggle_renderer,
338 'sensitive', LIST_SENSITIVE)
339 pkg_column.set_cell_data_func(pkg_toggle_renderer,
340 self.pkg_toggle_renderer_data_func)
341>>>>>>> UpdateManager/UpdatesAvailable.py
316342
317 pkg_icon_renderer = Gtk.CellRendererPixbuf()343 pkg_icon_renderer = Gtk.CellRendererPixbuf()
318 pkg_icon_renderer.set_property("ypad", 2)344 pkg_icon_renderer.set_property("ypad", 2)
@@ -340,7 +366,12 @@ class UpdatesAvailable(InternalDialog):
340 _("Download"), size_renderer, text=LIST_SIZE366 _("Download"), size_renderer, text=LIST_SIZE
341 )367 )
342 size_column.set_sizing(Gtk.TreeViewColumnSizing.AUTOSIZE)368 size_column.set_sizing(Gtk.TreeViewColumnSizing.AUTOSIZE)
369<<<<<<< UpdateManager/UpdatesAvailable.py
343 size_column.add_attribute(size_renderer, "sensitive", LIST_SENSITIVE)370 size_column.add_attribute(size_renderer, "sensitive", LIST_SENSITIVE)
371=======
372 size_column.add_attribute(size_renderer,
373 'sensitive', LIST_SENSITIVE)
374>>>>>>> UpdateManager/UpdatesAvailable.py
344 self.treeview_update.append_column(size_column)375 self.treeview_update.append_column(size_column)
345376
346 self.treeview_update.set_headers_visible(True)377 self.treeview_update.set_headers_visible(True)
@@ -365,10 +396,15 @@ class UpdatesAvailable(InternalDialog):
365 self.settings.get_boolean("show-details")396 self.settings.get_boolean("show-details")
366 )397 )
367 self.expander_details.connect("activate", self.pre_activate_details)398 self.expander_details.connect("activate", self.pre_activate_details)
399<<<<<<< UpdateManager/UpdatesAvailable.py
368 self.expander_details.connect(400 self.expander_details.connect(
369 "notify::expanded", self.activate_details401 "notify::expanded", self.activate_details
370 )402 )
371 self.expander_desc.connect("notify::expanded", self.activate_desc)403 self.expander_desc.connect("notify::expanded", self.activate_desc)
404=======
405 self.expander_details.connect("notify::expanded",
406 self.activate_details)
407>>>>>>> UpdateManager/UpdatesAvailable.py
372408
373 # If auto-updates are on, change cancel label409 # If auto-updates are on, change cancel label
374 self.notifier_settings = Gio.Settings.new("com.ubuntu.update-notifier")410 self.notifier_settings = Gio.Settings.new("com.ubuntu.update-notifier")
@@ -385,6 +421,8 @@ class UpdatesAvailable(InternalDialog):
385 "network-3g-alert", self._on_network_3g_alert421 "network-3g-alert", self._on_network_3g_alert
386 )422 )
387423
424 self._get_apt_news("/var/lib/ubuntu-advantage/messages/apt-news")
425
388 def stop(self):426 def stop(self):
389 InternalDialog.stop(self)427 InternalDialog.stop(self)
390 self._save_state()428 self._save_state()
@@ -539,8 +577,16 @@ class UpdatesAvailable(InternalDialog):
539577
540 renderer.set_property("markup", markup)578 renderer.set_property("markup", markup)
541579
542 def set_changes_buffer(self, changes_buffer, text, name, srcpkg):580 def set_changes_buffer(self, changes_buffer, long_desc, text, name, srcpkg):
543 changes_buffer.set_text("")581 changes_buffer.set_text("") # Clear "downloading list of changes..."
582
583 # Write the technical description section
584 changes_buffer.insert_with_tags_by_name(changes_buffer.get_end_iter(),
585 "Technical description\n",
586 "descriptiontag")
587 changes_buffer.insert(changes_buffer.get_end_iter(), long_desc + "\n\n")
588
589 # Write the changes section
544 lines = text.split("\n")590 lines = text.split("\n")
545 if len(lines) == 1:591 if len(lines) == 1:
546 changes_buffer.set_text(text)592 changes_buffer.set_text(text)
@@ -553,14 +599,24 @@ class UpdatesAvailable(InternalDialog):
553 )599 )
554 # bullet_match = re.match("^.*[\*-]", line)600 # bullet_match = re.match("^.*[\*-]", line)
555 author_match = re.match("^.*--.*<.*@.*>.*$", line)601 author_match = re.match("^.*--.*<.*@.*>.*$", line)
602 changes_match = re.match(r'^Changes for [^ ]+ versions:$', line)
556 if version_match:603 if version_match:
557 version = version_match.group(1)604 version = version_match.group(1)
558 # upload_archive = version_match.group(2).strip()605 # upload_archive = version_match.group(2).strip()
559 version_text = _("Version %s: \n") % version606 version_text = _("Version %s: \n") % version
607<<<<<<< UpdateManager/UpdatesAvailable.py
560 changes_buffer.insert_with_tags_by_name(608 changes_buffer.insert_with_tags_by_name(
561 end_iter, version_text, "versiontag"609 end_iter, version_text, "versiontag"
562 )610 )
563 elif author_match:611 elif author_match:
612=======
613 changes_buffer.insert_with_tags_by_name(end_iter, version_text,
614 "versiontag")
615 elif changes_match:
616 changes_buffer.insert_with_tags_by_name(end_iter, line + "\n",
617 "changestag")
618 elif (author_match):
619>>>>>>> UpdateManager/UpdatesAvailable.py
564 pass620 pass
565 else:621 else:
566 changes_buffer.insert(end_iter, line + "\n")622 changes_buffer.insert(end_iter, line + "\n")
@@ -590,12 +646,8 @@ class UpdatesAvailable(InternalDialog):
590 ):646 ):
591 changes_buffer = self.textview_changes.get_buffer()647 changes_buffer = self.textview_changes.get_buffer()
592 changes_buffer.set_text("")648 changes_buffer.set_text("")
593 desc_buffer = self.textview_descr.get_buffer()
594 desc_buffer.set_text("")
595 self.notebook_details.set_sensitive(False)
596 return649 return
597 long_desc = item.pkg.candidate.description650 long_desc = item.pkg.candidate.description
598 self.notebook_details.set_sensitive(True)
599 # do some regular expression magic on the description651 # do some regular expression magic on the description
600 # Add a newline before each bullet652 # Add a newline before each bullet
601 p = re.compile(r"^(\s|\t)*(\*|0|-)", re.MULTILINE)653 p = re.compile(r"^(\s|\t)*(\*|0|-)", re.MULTILINE)
@@ -608,9 +660,6 @@ class UpdatesAvailable(InternalDialog):
608 long_desc = p.sub("\n", long_desc)660 long_desc = p.sub("\n", long_desc)
609 long_desc = "Package: %s\n%s" % (item.pkg.name, long_desc)661 long_desc = "Package: %s\n%s" % (item.pkg.name, long_desc)
610662
611 desc_buffer = self.textview_descr.get_buffer()
612 desc_buffer.set_text(long_desc)
613
614 # now do the changelog663 # now do the changelog
615 name = item.pkg.name664 name = item.pkg.name
616 if name is None:665 if name is None:
@@ -623,7 +672,7 @@ class UpdatesAvailable(InternalDialog):
623 if name in self.cache.all_changes:672 if name in self.cache.all_changes:
624 changes = self.cache.all_changes[name]673 changes = self.cache.all_changes[name]
625 srcpkg = self.cache[name].candidate.source_name674 srcpkg = self.cache[name].candidate.source_name
626 self.set_changes_buffer(changes_buffer, changes, name, srcpkg)675 self.set_changes_buffer(changes_buffer, long_desc, changes, name, srcpkg)
627 # if not connected, do not even attempt to get the changes676 # if not connected, do not even attempt to get the changes
628 elif not self.connected:677 elif not self.connected:
629 changes_buffer.set_text(678 changes_buffer.set_text(
@@ -674,8 +723,9 @@ class UpdatesAvailable(InternalDialog):
674 changes += self.cache.all_news[name]723 changes += self.cache.all_news[name]
675 if name in self.cache.all_changes:724 if name in self.cache.all_changes:
676 changes += self.cache.all_changes[name]725 changes += self.cache.all_changes[name]
677 if changes:726
678 self.set_changes_buffer(changes_buffer, changes, name, srcpkg)727 if changes or long_desc:
728 self.set_changes_buffer(changes_buffer, long_desc, changes, name, srcpkg)
679729
680 def on_treeview_button_press(self, widget, event):730 def on_treeview_button_press(self, widget, event):
681 """731 """
@@ -704,6 +754,14 @@ class UpdatesAvailable(InternalDialog):
704 menu.show()754 menu.show()
705 return True755 return True
706756
757 def _get_apt_news(self, apt_news_file):
758 if os.access(apt_news_file, os.R_OK):
759 with open(apt_news_file) as f:
760 apt_news = f.read()
761 if apt_news:
762 self.news.get_buffer().set_text(apt_news)
763 self.expander_news.set_visible(True)
764
707 # we need this for select all/unselect all765 # we need this for select all/unselect all
708 def _toggle_group_headers(self, new_selection_value):766 def _toggle_group_headers(self, new_selection_value):
709 """small helper that will set/unset the group headers"""767 """small helper that will set/unset the group headers"""
@@ -806,6 +864,7 @@ class UpdatesAvailable(InternalDialog):
806 # self.button_install.set_sensitive(True)864 # self.button_install.set_sensitive(True)
807 self.button_install.set_sensitive(True)865 self.button_install.set_sensitive(True)
808 self.unity.set_install_menuitem_visible(True)866 self.unity.set_install_menuitem_visible(True)
867 self.button_pro.destroy()
809 else:868 else:
810 if inst_count > 0:869 if inst_count > 0:
811 download_str = ngettext(870 download_str = ngettext(
@@ -815,10 +874,15 @@ class UpdatesAvailable(InternalDialog):
815 )874 )
816 self.button_install.set_sensitive(True)875 self.button_install.set_sensitive(True)
817 self.unity.set_install_menuitem_visible(True)876 self.unity.set_install_menuitem_visible(True)
877 self.button_pro.destroy()
878 elif self.list.ubuntu_pro_groups:
879 download_str = _("You need to enable Ubuntu Pro to install these updates.")
880 self.button_install.destroy()
818 else:881 else:
819 download_str = _("There are no updates to install.")882 download_str = _("There are no updates to install.")
820 self.button_install.set_sensitive(False)883 self.button_install.set_sensitive(False)
821 self.unity.set_install_menuitem_visible(False)884 self.unity.set_install_menuitem_visible(False)
885 self.button_pro.destroy()
822 self.image_downsize.set_sensitive(False)886 self.image_downsize.set_sensitive(False)
823 self.label_downsize.set_text(download_str)887 self.label_downsize.set_text(download_str)
824 self.hbox_downsize.show()888 self.hbox_downsize.show()
@@ -868,7 +932,6 @@ class UpdatesAvailable(InternalDialog):
868 "to finish installing previous updates."932 "to finish installing previous updates."
869 )933 )
870934
871 self.notebook_details.set_sensitive(True)
872 self.treeview_update.set_sensitive(True)935 self.treeview_update.set_sensitive(True)
873 self.set_header(text_header)936 self.set_header(text_header)
874 self.set_desc(text_desc)937 self.set_desc(text_desc)
@@ -889,8 +952,10 @@ class UpdatesAvailable(InternalDialog):
889 self._restore_state()952 self._restore_state()
890953
891 def activate_desc(self, expander, data):954 def activate_desc(self, expander, data):
892 expanded = self.expander_desc.get_expanded()955 return
893 self.expander_desc.set_vexpand(expanded)956
957 def on_button_pro_clicked(self):
958 self.window_main.show_settings(6)
894959
895 def on_button_install_clicked(self):960 def on_button_install_clicked(self):
896 self.unity.set_install_menuitem_visible(False)961 self.unity.set_install_menuitem_visible(False)
@@ -1099,11 +1164,15 @@ class UpdatesAvailable(InternalDialog):
1099 UpdateData(groups, None, None),1164 UpdateData(groups, None, None),
1100 humanize_size(total_size),1165 humanize_size(total_size),
1101 True,1166 True,
1167<<<<<<< UpdateManager/UpdatesAvailable.py
1102 sensitive,1168 sensitive,
1169=======
1170 sensitive
1171>>>>>>> UpdateManager/UpdatesAvailable.py
1103 ]1172 ]
1104 return self.store.append(None, header_row)1173 return self.store.append(None, header_row)
11051174
1106 def _add_groups(self, groups):1175 def _add_groups(self, groups, parent = None):
1107 # Each row contains:1176 # Each row contains:
1108 # row label (for screen reader),1177 # row label (for screen reader),
1109 # update data tuple (is_toplevel, group object, package object),1178 # update data tuple (is_toplevel, group object, package object),
@@ -1120,18 +1189,27 @@ class UpdatesAvailable(InternalDialog):
1120 ):1189 ):
1121 group_is_item = group.items[0]1190 group_is_item = group.items[0]
11221191
1192<<<<<<< UpdateManager/UpdatesAvailable.py
1123 name = group.name1193 name = group.name
1124 if len(group.items) > 1:1194 if len(group.items) > 1:
1125 name = '%s (%d)' % (group.name, len(group.items))1195 name = '%s (%d)' % (group.name, len(group.items))
11261196
1197=======
1198 if group.name == "Ubuntu base":
1199 group.name = "System components"
1200>>>>>>> UpdateManager/UpdatesAvailable.py
1127 group_row = [1201 group_row = [
1128 name,1202 name,
1129 UpdateData(None, group, group_is_item),1203 UpdateData(None, group, group_is_item),
1130 humanize_size(group.get_total_size()),1204 humanize_size(group.get_total_size()),
1131 True,1205 True,
1206<<<<<<< UpdateManager/UpdatesAvailable.py
1132 group.sensitive,1207 group.sensitive,
1208=======
1209 group.sensitive
1210>>>>>>> UpdateManager/UpdatesAvailable.py
1133 ]1211 ]
1134 group_iter = self.store.append(None, group_row)1212 group_iter = self.store.append(parent, group_row)
11351213
1136 if group_is_item:1214 if group_is_item:
1137 continue1215 continue
@@ -1141,7 +1219,11 @@ class UpdatesAvailable(InternalDialog):
1141 UpdateData(None, None, item),1219 UpdateData(None, None, item),
1142 humanize_size(getattr(item.pkg.candidate, "size", 0)),1220 humanize_size(getattr(item.pkg.candidate, "size", 0)),
1143 True,1221 True,
1222<<<<<<< UpdateManager/UpdatesAvailable.py
1144 group.sensitive,1223 group.sensitive,
1224=======
1225 group.sensitive
1226>>>>>>> UpdateManager/UpdatesAvailable.py
1145 ]1227 ]
1146 self.store.append(group_iter, item_row)1228 self.store.append(group_iter, item_row)
11471229
@@ -1183,6 +1265,7 @@ class UpdatesAvailable(InternalDialog):
1183 self.list.kernel_autoremove_groups,1265 self.list.kernel_autoremove_groups,
1184 )1266 )
1185 self._add_groups(self.list.kernel_autoremove_groups)1267 self._add_groups(self.list.kernel_autoremove_groups)
1268<<<<<<< UpdateManager/UpdatesAvailable.py
1186 if self.list.duplicate_groups:1269 if self.list.duplicate_groups:
1187 self._add_header(1270 self._add_header(
1188 _("Duplicate packages to be removed"),1271 _("Duplicate packages to be removed"),
@@ -1196,6 +1279,11 @@ class UpdatesAvailable(InternalDialog):
1196 sensitive=False,1279 sensitive=False,
1197 )1280 )
1198 self._add_groups(self.list.ubuntu_pro_groups)1281 self._add_groups(self.list.ubuntu_pro_groups)
1282=======
1283 if self.list.ubuntu_pro_groups:
1284 header = self._add_header(_("Ubuntu Pro security updates (enable in Settings…)"), self.list.ubuntu_pro_groups, sensitive=False)
1285 self._add_groups(self.list.ubuntu_pro_groups, header)
1286>>>>>>> UpdateManager/UpdatesAvailable.py
11991287
1200 self.treeview_update.set_model(self.store)1288 self.treeview_update.set_model(self.store)
1201 self.pkg_cell_area.indent_toplevel = (1289 self.pkg_cell_area.indent_toplevel = (
diff --git a/UpdateManager/backend/InstallBackendAptdaemon.py b/UpdateManager/backend/InstallBackendAptdaemon.py
index 2959aa6..aed2548 100644
--- a/UpdateManager/backend/InstallBackendAptdaemon.py
+++ b/UpdateManager/backend/InstallBackendAptdaemon.py
@@ -129,9 +129,12 @@ class InstallBackendAptdaemon(InstallBackend, BuilderDialog):
129 self._expanded_size = None129 self._expanded_size = None
130 self.button_cancel = None130 self.button_cancel = None
131 self.trans_failed_msg = None131 self.trans_failed_msg = None
132<<<<<<< UpdateManager/backend/InstallBackendAptdaemon.py
132 self.progressbar = None133 self.progressbar = None
133 self._active_transaction = None134 self._active_transaction = None
134 self._expander = None135 self._expander = None
136=======
137>>>>>>> UpdateManager/backend/InstallBackendAptdaemon.py
135138
136 def close(self):139 def close(self):
137 if self.button_cancel and self.button_cancel.get_sensitive():140 if self.button_cancel and self.button_cancel.get_sensitive():
@@ -328,6 +331,7 @@ class InstallBackendAptdaemon(InstallBackend, BuilderDialog):
328 try:331 try:
329 reinstall = purge = downgrade = []332 reinstall = purge = downgrade = []
330 trans = yield self.client.commit_packages(333 trans = yield self.client.commit_packages(
334<<<<<<< UpdateManager/backend/InstallBackendAptdaemon.py
331 pkgs_install,335 pkgs_install,
332 reinstall,336 reinstall,
333 pkgs_remove,337 pkgs_remove,
@@ -347,6 +351,17 @@ class InstallBackendAptdaemon(InstallBackend, BuilderDialog):
347 error_string=None,351 error_string=None,
348 error_desc=None,352 error_desc=None,
349 )353 )
354=======
355 pkgs_install, reinstall, pkgs_remove, purge, pkgs_upgrade,
356 downgrade, defer=True)
357 trans.connect("progress-changed", self._on_progress_changed)
358 yield self._show_transaction(trans, self.ACTION_INSTALL,
359 _("Installing updates…"), True)
360 except errors.NotAuthorizedError as e:
361 self._action_done(self.ACTION_INSTALL,
362 authorized=False, success=False,
363 error_string=None, error_desc=None)
364>>>>>>> UpdateManager/backend/InstallBackendAptdaemon.py
350 except errors.TransactionFailed as e:365 except errors.TransactionFailed as e:
351 self.trans_failed_msg = str(e)366 self.trans_failed_msg = str(e)
352 except dbus.DBusException as e:367 except dbus.DBusException as e:
@@ -524,6 +539,7 @@ class InstallBackendAptdaemon(InstallBackend, BuilderDialog):
524 error_desc = error_desc + "\n" + self.trans_failed_msg539 error_desc = error_desc + "\n" + self.trans_failed_msg
525 # tell unity to hide the progress again540 # tell unity to hide the progress again
526 self.unity.set_progress(-1)541 self.unity.set_progress(-1)
542<<<<<<< UpdateManager/backend/InstallBackendAptdaemon.py
527 is_success = status == EXIT_SUCCESS543 is_success = status == EXIT_SUCCESS
528 try:544 try:
529 self._action_done(545 self._action_done(
@@ -534,10 +550,19 @@ class InstallBackendAptdaemon(InstallBackend, BuilderDialog):
534 error_desc=error_desc,550 error_desc=error_desc,
535 trans_failed=trans_failed,551 trans_failed=trans_failed,
536 )552 )
553=======
554 is_success = (status == EXIT_SUCCESS)
555 try:
556 self._action_done(action,
557 authorized=True, success=is_success,
558 error_string=error_string, error_desc=error_desc,
559 trans_failed=trans_failed)
560>>>>>>> UpdateManager/backend/InstallBackendAptdaemon.py
537 except TypeError:561 except TypeError:
538 # this module used to be be lazily imported and in older code562 # this module used to be be lazily imported and in older code
539 # trans_failed= is not accepted563 # trans_failed= is not accepted
540 # TODO: this workaround can be dropped in Ubuntu 20.10564 # TODO: this workaround can be dropped in Ubuntu 20.10
565<<<<<<< UpdateManager/backend/InstallBackendAptdaemon.py
541 self._action_done(566 self._action_done(
542 action,567 action,
543 authorized=True,568 authorized=True,
@@ -545,6 +570,11 @@ class InstallBackendAptdaemon(InstallBackend, BuilderDialog):
545 error_string=error_string,570 error_string=error_string,
546 error_desc=error_desc,571 error_desc=error_desc,
547 )572 )
573=======
574 self._action_done(action,
575 authorized=True, success=is_success,
576 error_string=error_string, error_desc=error_desc)
577>>>>>>> UpdateManager/backend/InstallBackendAptdaemon.py
548578
549579
550if __name__ == "__main__":580if __name__ == "__main__":
diff --git a/UpdateManager/backend/__init__.py b/UpdateManager/backend/__init__.py
index 72a6031..9c669e6 100644
--- a/UpdateManager/backend/__init__.py
+++ b/UpdateManager/backend/__init__.py
@@ -11,8 +11,11 @@ gi.require_version("Snapd", "2")
11from gi.repository import GLib, Gtk, Snapd11from gi.repository import GLib, Gtk, Snapd
1212
13from apt import Cache13from apt import Cache
14<<<<<<< UpdateManager/backend/__init__.py
14import json15import json
15import logging16import logging
17=======
18>>>>>>> UpdateManager/backend/__init__.py
16import os19import os
17import re20import re
18import subprocess21import subprocess
@@ -65,14 +68,20 @@ class InstallBackend(Dialog):
65 fresh_cache = Cache(rootdir=self.window_main.cache.rootdir)68 fresh_cache = Cache(rootdir=self.window_main.cache.rootdir)
66 for pkg in self.window_main.cache:69 for pkg in self.window_main.cache:
67 try:70 try:
71<<<<<<< UpdateManager/backend/__init__.py
68 if (72 if (
69 pkg.marked_install73 pkg.marked_install
70 and not fresh_cache[pkg.name].is_installed74 and not fresh_cache[pkg.name].is_installed
71 ):75 ):
76=======
77 if pkg.marked_install and \
78 not fresh_cache[pkg.name].is_installed:
79>>>>>>> UpdateManager/backend/__init__.py
72 pkgname = pkg.name80 pkgname = pkg.name
73 if pkg.is_auto_installed:81 if pkg.is_auto_installed:
74 pkgname += "#auto"82 pkgname += "#auto"
75 pkgs_install.append(pkgname)83 pkgs_install.append(pkgname)
84<<<<<<< UpdateManager/backend/__init__.py
76 elif (85 elif (
77 pkg.marked_upgrade86 pkg.marked_upgrade
78 and fresh_cache[pkg.name].is_upgradable87 and fresh_cache[pkg.name].is_upgradable
@@ -82,6 +91,13 @@ class InstallBackend(Dialog):
82 pkg.marked_delete91 pkg.marked_delete
83 and fresh_cache[pkg.name].is_installed92 and fresh_cache[pkg.name].is_installed
84 ):93 ):
94=======
95 elif (pkg.marked_upgrade and
96 fresh_cache[pkg.name].is_upgradable):
97 pkgs_upgrade.append(pkg.name)
98 elif (pkg.marked_delete and
99 fresh_cache[pkg.name].is_installed):
100>>>>>>> UpdateManager/backend/__init__.py
85 pkgs_remove.append(pkg.name)101 pkgs_remove.append(pkg.name)
86 except KeyError:102 except KeyError:
87 # pkg missing from fresh_cache can't be modified103 # pkg missing from fresh_cache can't be modified
@@ -247,6 +263,7 @@ class InstallBackend(Dialog):
247 plug = conn_cols[1]263 plug = conn_cols[1]
248 slot = conn_cols[2]264 slot = conn_cols[2]
249265
266<<<<<<< UpdateManager/backend/__init__.py
250 if slot.startswith(snap + ":"):267 if slot.startswith(snap + ":"):
251 plug_snap = plug.split(":")[0]268 plug_snap = plug.split(":")[0]
252 if (269 if (
@@ -373,6 +390,10 @@ class InstallBackend(Dialog):
373 error_desc,390 error_desc,
374 trans_failed=False,391 trans_failed=False,
375 ):392 ):
393=======
394 def _action_done(self, action, authorized, success, error_string,
395 error_desc, trans_failed=False):
396>>>>>>> UpdateManager/backend/__init__.py
376397
377 # If the progress dialog should be closed automatically afterwards398 # If the progress dialog should be closed automatically afterwards
378 # settings = Gio.Settings.new("com.ubuntu.update-manager")399 # settings = Gio.Settings.new("com.ubuntu.update-manager")
@@ -395,9 +416,14 @@ class InstallBackend(Dialog):
395 elif success:416 elif success:
396 self.window_main.start_available()417 self.window_main.start_available()
397 elif error_string:418 elif error_string:
419<<<<<<< UpdateManager/backend/__init__.py
398 self.window_main.start_error(420 self.window_main.start_error(
399 trans_failed, error_string, error_desc421 trans_failed, error_string, error_desc
400 )422 )
423=======
424 self.window_main.start_error(trans_failed, error_string,
425 error_desc)
426>>>>>>> UpdateManager/backend/__init__.py
401 else:427 else:
402 # exit gracefuly, we can't just exit as this will trigger428 # exit gracefuly, we can't just exit as this will trigger
403 # a crash if system.exit() is called in a exception handler429 # a crash if system.exit() is called in a exception handler
@@ -418,14 +444,20 @@ class InstallBackend(Dialog):
418444
419445
420# try aptdaemon446# try aptdaemon
447<<<<<<< UpdateManager/backend/__init__.py
421if (448if (
422 os.path.exists("/usr/sbin/aptd")449 os.path.exists("/usr/sbin/aptd")
423 and "UPDATE_MANAGER_FORCE_BACKEND_SYNAPTIC" not in os.environ450 and "UPDATE_MANAGER_FORCE_BACKEND_SYNAPTIC" not in os.environ
424):451):
452=======
453if os.path.exists("/usr/sbin/aptd") \
454 and "UPDATE_MANAGER_FORCE_BACKEND_SYNAPTIC" not in os.environ:
455>>>>>>> UpdateManager/backend/__init__.py
425 # check if the gtkwidgets are installed as well456 # check if the gtkwidgets are installed as well
426 try:457 try:
427 from .InstallBackendAptdaemon import InstallBackendAptdaemon458 from .InstallBackendAptdaemon import InstallBackendAptdaemon
428 except ImportError:459 except ImportError:
460<<<<<<< UpdateManager/backend/__init__.py
429 logging.exception("importing aptdaemon")461 logging.exception("importing aptdaemon")
430# try synaptic462# try synaptic
431if (463if (
@@ -435,6 +467,17 @@ if (
435 try:467 try:
436 from .InstallBackendSynaptic import InstallBackendSynaptic468 from .InstallBackendSynaptic import InstallBackendSynaptic
437 except ImportError:469 except ImportError:
470=======
471 import logging
472 logging.exception("importing aptdaemon")
473# try synaptic
474if os.path.exists("/usr/sbin/synaptic") \
475 and "UPDATE_MANAGER_FORCE_BACKEND_APTDAEMON" not in os.environ:
476 try:
477 from .InstallBackendSynaptic import InstallBackendSynaptic
478 except ImportError:
479 import logging
480>>>>>>> UpdateManager/backend/__init__.py
438 logging.exception("importing synaptic")481 logging.exception("importing synaptic")
439482
440483
@@ -449,18 +492,31 @@ def get_backend(*args, **kwargs):
449 try:492 try:
450 return InstallBackendAptdaemon(*args, **kwargs)493 return InstallBackendAptdaemon(*args, **kwargs)
451 except NameError:494 except NameError:
495<<<<<<< UpdateManager/backend/__init__.py
452 logging.exception("using aptdaemon failed")496 logging.exception("using aptdaemon failed")
453 # try synaptic497 # try synaptic
454 if (498 if (
455 os.path.exists("/usr/sbin/synaptic")499 os.path.exists("/usr/sbin/synaptic")
456 and "UPDATE_MANAGER_FORCE_BACKEND_APTDAEMON" not in os.environ500 and "UPDATE_MANAGER_FORCE_BACKEND_APTDAEMON" not in os.environ
457 ):501 ):
502=======
503 import logging
504 logging.exception("using aptdaemon failed")
505 # try synaptic
506 if (os.path.exists("/usr/sbin/synaptic")
507 and "UPDATE_MANAGER_FORCE_BACKEND_APTDAEMON" not in os.environ):
508>>>>>>> UpdateManager/backend/__init__.py
458 try:509 try:
459 return InstallBackendSynaptic(*args, **kwargs)510 return InstallBackendSynaptic(*args, **kwargs)
460 except NameError:511 except NameError:
461 pass512 pass
462 # nothing found, raise513 # nothing found, raise
514<<<<<<< UpdateManager/backend/__init__.py
463 raise Exception(515 raise Exception(
464 "No working backend found, please try installing "516 "No working backend found, please try installing "
465 "aptdaemon or synaptic"517 "aptdaemon or synaptic"
466 )518 )
519=======
520 raise Exception("No working backend found, please try installing "
521 "aptdaemon or synaptic")
522>>>>>>> UpdateManager/backend/__init__.py
diff --git a/data/gtkbuilder/UpdateManager.ui b/data/gtkbuilder/UpdateManager.ui
index d38eeaf..e7b9dee 100644
--- a/data/gtkbuilder/UpdateManager.ui
+++ b/data/gtkbuilder/UpdateManager.ui
@@ -6,17 +6,47 @@
6 <property name="can_focus">False</property>6 <property name="can_focus">False</property>
7 <property name="spacing">12</property>7 <property name="spacing">12</property>
8 <child>8 <child>
9 <object class="GtkExpander" id="expander_news">
10 <property name="visible">False</property>
11 <property name="can_focus">True</property>
12 <property name="label">News</property>
13 <property name="spacing">6</property>
14 <child>
15 <object class="GtkScrolledWindow">
16 <property name="visible">True</property>
17 <property name="can_focus">True</property>
18 <property name="shadow_type">in</property>
19 <property name="min_content_height">80</property>
20 <child>
21 <object class="GtkTextView" id="news">
22 <property name="visible">True</property>
23 <property name="editable">False</property>
24 <property name="pixels_above_lines">6</property>
25 <property name="left_margin">6</property>
26 <property name="right_margin">6</property>
27 <property name="wrap_mode">word</property>
28 <property name="cursor_visible">False</property>
29 <property name="accepts_tab">False</property>
30 </object>
31 </child>
32 </object>
33 </child>
34 </object>
35 <packing>
36 <property name="expand">False</property>
37 <property name="position">0</property>
38 </packing>
39 </child>
40 <child>
9 <object class="GtkExpander" id="expander_details">41 <object class="GtkExpander" id="expander_details">
10 <property name="visible">True</property>42 <property name="visible">True</property>
11 <property name="can_focus">True</property>43 <property name="can_focus">True</property>
12 <property name="spacing">6</property>44 <property name="spacing">6</property>
13 <property name="resize_toplevel">True</property>45 <property name="resize_toplevel">True</property>
14 <child>46 <child>
15 <object class="GtkVBox" id="vbox4">47 <object class="GtkPaned" id="paned">
16 <property name="visible">True</property>48 <property name="visible">True</property>
17 <property name="can_focus">False</property>49 <property name="orientation">vertical</property>
18 <property name="vexpand">True</property>
19 <property name="spacing">6</property>
20 <child>50 <child>
21 <object class="GtkScrolledWindow" id="scrolledwindow_update">51 <object class="GtkScrolledWindow" id="scrolledwindow_update">
22 <property name="visible">True</property>52 <property name="visible">True</property>
@@ -44,113 +74,21 @@
44 </child>74 </child>
45 </object>75 </object>
46 <packing>76 <packing>
47 <property name="expand">True</property>77 <property name="shrink">False</property>
48 <property name="fill">True</property>78 <property name="resize">True</property>
49 <property name="position">0</property>
50 </packing>79 </packing>
51 </child>80 </child>
52 <child>81 <child>
53 <object class="GtkExpander" id="expander_desc">82 <object class="GtkScrolledWindow" id="scrolledwindow_changes">
54 <property name="visible">True</property>83 <property name="visible">True</property>
55 <property name="can_focus">True</property>84 <property name="can_focus">True</property>
85 <property name="shadow_type">in</property>
56 <child>86 <child>
57 <object class="GtkNotebook" id="notebook_details">87 <placeholder/>
58 <property name="visible">True</property>
59 <property name="can_focus">True</property>
60 <property name="show_border">False</property>
61 <child>
62 <object class="GtkVBox" id="vbox5">
63 <property name="visible">True</property>
64 <property name="can_focus">False</property>
65 <property name="border_width">6</property>
66 <property name="spacing">6</property>
67 <child>
68 <object class="GtkScrolledWindow" id="scrolledwindow_changes">
69 <property name="visible">True</property>
70 <property name="can_focus">True</property>
71 <property name="shadow_type">in</property>
72 <child>
73 <placeholder/>
74 </child>
75 </object>
76 <packing>
77 <property name="expand">True</property>
78 <property name="fill">True</property>
79 <property name="position">0</property>
80 </packing>
81 </child>
82 </object>
83 </child>
84 <child type="tab">
85 <object class="GtkLabel" id="label8">
86 <property name="visible">True</property>
87 <property name="can_focus">False</property>
88 <property name="label" translatable="yes">Changes</property>
89 </object>
90 <packing>
91 <property name="tab_fill">False</property>
92 </packing>
93 </child>
94 <child>
95 <object class="GtkScrolledWindow" id="scrolledwindow3">
96 <property name="visible">True</property>
97 <property name="can_focus">True</property>
98 <property name="border_width">6</property>
99 <property name="shadow_type">in</property>
100 <property name="min_content_height">80</property>
101 <child>
102 <object class="GtkTextView" id="textview_descr">
103 <property name="visible">True</property>
104 <property name="can_focus">True</property>
105 <property name="pixels_above_lines">6</property>
106 <property name="editable">False</property>
107 <property name="wrap_mode">word</property>
108 <property name="left_margin">6</property>
109 <property name="right_margin">6</property>
110 <property name="cursor_visible">False</property>
111 <property name="accepts_tab">False</property>
112 <child internal-child="accessible">
113 <object class="AtkObject" id="textview_descr-atkobject">
114 <property name="AtkObject::accessible-name" translatable="yes">Description</property>
115 </object>
116 </child>
117 </object>
118 </child>
119 </object>
120 <packing>
121 <property name="position">1</property>
122 </packing>
123 </child>
124 <child type="tab">
125 <object class="GtkLabel" id="label9">
126 <property name="visible">True</property>
127 <property name="can_focus">False</property>
128 <property name="label" translatable="yes">Description</property>
129 <child internal-child="accessible">
130 <object class="AtkObject" id="label9-atkobject">
131 <property name="AtkObject::accessible-name" translatable="yes">Description</property>
132 </object>
133 </child>
134 </object>
135 <packing>
136 <property name="position">1</property>
137 <property name="tab_fill">False</property>
138 </packing>
139 </child>
140 </object>
141 </child>
142 <child type="label">
143 <object class="GtkLabel" id="label13">
144 <property name="visible">True</property>
145 <property name="can_focus">False</property>
146 <property name="label" translatable="yes">Technical description</property>
147 </object>
148 </child>88 </child>
149 </object>89 </object>
150 <packing>90 <packing>
151 <property name="expand">False</property>91 <property name="resize">True</property>
152 <property name="fill">True</property>
153 <property name="position">1</property>
154 </packing>92 </packing>
155 </child>93 </child>
156 </object>94 </object>
@@ -167,7 +105,7 @@
167 <packing>105 <packing>
168 <property name="expand">True</property>106 <property name="expand">True</property>
169 <property name="fill">True</property>107 <property name="fill">True</property>
170 <property name="position">2</property>108 <property name="position">1</property>
171 </packing>109 </packing>
172 </child>110 </child>
173 <child>111 <child>
@@ -177,13 +115,14 @@
177 <child>115 <child>
178 <object class="GtkHBox" id="hbox_downsize">116 <object class="GtkHBox" id="hbox_downsize">
179 <property name="can_focus">False</property>117 <property name="can_focus">False</property>
180 <property name="spacing">12</property>118 <property name="spacing">8</property>
181 <child>119 <child>
182 <object class="GtkImage" id="image_downsize">120 <object class="GtkImage" id="image_downsize">
183 <property name="visible">True</property>121 <property name="visible">True</property>
184 <property name="can_focus">False</property>122 <property name="can_focus">False</property>
185 <property name="pixel-size">16</property>123 <property name="pixel-size">16</property>
186 <property name="icon_name">aptdaemon-download</property>124 <property name="icon_name">aptdaemon-download</property>
125 <property name="pixel_size">16</property>
187 </object>126 </object>
188 <packing>127 <packing>
189 <property name="expand">False</property>128 <property name="expand">False</property>
@@ -401,7 +340,7 @@
401 <packing>340 <packing>
402 <property name="expand">False</property>341 <property name="expand">False</property>
403 <property name="fill">True</property>342 <property name="fill">True</property>
404 <property name="position">3</property>343 <property name="position">2</property>
405 </packing>344 </packing>
406 </child>345 </child>
407 </object>346 </object>
diff --git a/debian/changelog b/debian/changelog
index e8e7e44..55ae22c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,4 @@
1<<<<<<< debian/changelog
1update-manager (1:23.10.1) mantic; urgency=medium2update-manager (1:23.10.1) mantic; urgency=medium
23
3 * When displaying updates also include the quantity of updates in each4 * When displaying updates also include the quantity of updates in each
@@ -276,12 +277,54 @@ update-manager (1:20.04.12) groovy; urgency=medium
276 -- Marcus Tomlinson <marcus.tomlinson@canonical.com> Thu, 28 May 2020 10:11:51 +0100277 -- Marcus Tomlinson <marcus.tomlinson@canonical.com> Thu, 28 May 2020 10:11:51 +0100
277278
278update-manager (1:20.04.11) groovy; urgency=medium279update-manager (1:20.04.11) groovy; urgency=medium
280=======
281update-manager (1:18.04.11.18) unreleased; urgency=medium
282
283 * Implement the new Ubuntu Pro design.
284 - Fuse the description and changes tabs into a single view.
285 - Add button to attach to enable Ubuntu Pro if it is the only action
286 available.
287 - Ubuntu base -> System components.
288 - Fix Ubuntu Pro item not being a parent group of its corresponding
289 packages.
290
291 -- Nathan Pratta Teodosio <nathan.teodosio@canonical.com> Mon, 17 Jul 2023 15:45:42 +0200
292
293update-manager (1:18.04.11.17) bionic; urgency=medium
294
295 * Fix Ubuntu Pro updates checkbox and expander widget from overlapping
296 (LP: #1990450)
297
298 -- Robert Ancell <robert.ancell@canonical.com> Fri, 03 Feb 2023 14:55:56 +1300
299
300update-manager (1:18.04.11.16) bionic; urgency=medium
301
302 * Update of the parsing for pro client changes (lp: #1990450)
303
304 -- Sebastien Bacher <seb128@ubuntu.com> Thu, 26 Jan 2023 12:05:05 +0100
305
306update-manager (1:18.04.11.15) bionic; urgency=medium
307
308 * Show pending Ubuntu pro packages (LP: #1990450)
309
310 -- Robert Ancell <robert.ancell@canonical.com> Wed, 18 Jan 2023 15:09:17 +1300
311
312update-manager (1:18.04.11.14) bionic; urgency=medium
313
314 * tests/test_meta_release_core.py: switch a test from using lucid to bionic
315 as precise was removed from the archive. (LP: #1929865)
316
317 -- Brian Murray <brian@ubuntu.com> Thu, 27 May 2021 13:54:14 -0700
318
319update-manager (1:18.04.11.13) bionic; urgency=medium
320>>>>>>> debian/changelog
279321
280 * UpdateManager/UpdateManager.py: when refreshing the cache and encountering322 * UpdateManager/UpdateManager.py: when refreshing the cache and encountering
281 an error return rather than trying to use the undefined cache which causes323 an error return rather than trying to use the undefined cache which causes
282 crashes. Additionally, don't present the dialog with a "Try Again" button324 crashes. Additionally, don't present the dialog with a "Try Again" button
283 which won't do anything. (LP: #1826213)325 which won't do anything. (LP: #1826213)
284326
327<<<<<<< debian/changelog
285 -- Brian Murray <brian@ubuntu.com> Wed, 27 May 2020 13:29:24 -0700328 -- Brian Murray <brian@ubuntu.com> Wed, 27 May 2020 13:29:24 -0700
286329
287update-manager (1:20.04.10) focal; urgency=medium330update-manager (1:20.04.10) focal; urgency=medium
@@ -409,11 +452,37 @@ update-manager (1:19.04.3) disco; urgency=medium
409 -- Jeremy Bicha <jbicha@ubuntu.com> Sun, 10 Feb 2019 13:23:47 -0500452 -- Jeremy Bicha <jbicha@ubuntu.com> Sun, 10 Feb 2019 13:23:47 -0500
410453
411update-manager (1:19.04.2) disco; urgency=medium454update-manager (1:19.04.2) disco; urgency=medium
455=======
456 -- Brian Murray <brian@ubuntu.com> Wed, 03 Jun 2020 11:41:50 -0700
457
458update-manager (1:18.04.11.12) bionic; urgency=medium
459
460 * Resolve pep8 failures.
461
462 -- Brian Murray <brian@ubuntu.com> Tue, 21 Apr 2020 07:27:24 -0700
463
464update-manager (1:18.04.11.11) bionic; urgency=medium
465
466 * UpdateManager/UpdateManager.py: Do not offer to upgrade systems running on
467 an i386 host architecture to another release. (LP: #1845690)
468
469 -- Brian Murray <brian@ubuntu.com> Thu, 09 Apr 2020 13:39:04 -0700
470
471update-manager (1:18.04.11.10) bionic; urgency=medium
472
473 * UpdateManager/Core/utils.py: when testing to see if a url is downloadable
474 support https in addition to http and ftp. (LP: #1823410)
475
476 -- Brian Murray <brian@ubuntu.com> Tue, 09 Apr 2019 16:03:46 -0700
477
478update-manager (1:18.04.11.9) bionic; urgency=medium
479>>>>>>> debian/changelog
412480
413 * UpdateManager/Core/MetaRelease.py: set prompt in MetaReleaseCore so that481 * UpdateManager/Core/MetaRelease.py: set prompt in MetaReleaseCore so that
414 do-release-upgrade can provide more informative error messages.482 do-release-upgrade can provide more informative error messages.
415 (LP: #1798618, LP: #1795024)483 (LP: #1798618, LP: #1795024)
416484
485<<<<<<< debian/changelog
417 -- Brian Murray <brian@ubuntu.com> Wed, 28 Nov 2018 09:49:44 -0800486 -- Brian Murray <brian@ubuntu.com> Wed, 28 Nov 2018 09:49:44 -0800
418487
419update-manager (1:19.04.1) disco; urgency=medium488update-manager (1:19.04.1) disco; urgency=medium
@@ -449,6 +518,39 @@ update-manager (1:18.10.9) cosmic; urgency=medium
449 -- Balint Reczey <rbalint@ubuntu.com> Mon, 01 Oct 2018 18:00:40 +0200518 -- Balint Reczey <rbalint@ubuntu.com> Mon, 01 Oct 2018 18:00:40 +0200
450519
451update-manager (1:18.10.8) cosmic; urgency=medium520update-manager (1:18.10.8) cosmic; urgency=medium
521=======
522 -- Brian Murray <brian@ubuntu.com> Mon, 14 Jan 2019 13:40:08 -0800
523
524update-manager (1:18.04.11.8) bionic; urgency=medium
525
526 * Do not show the livepatch reminder if update-manager is running
527 on a distribution without software-properties-gtk. (LP: #1805118)
528
529 -- Andrea Azzarone <andrea.azzarone@canonical.com> Tue, 27 Nov 2018 13:26:00 +0000
530
531update-manager (1:18.04.11.7) bionic; urgency=medium
532
533 * Add a reminder to enable Livepatch (LP: #1787553).
534 * Build-Depends on python3-distro-info.
535
536 -- Andrea Azzarone <andrea.azzarone@canonical.com> Fri, 07 Sep 2018 10:41:28 +0200
537
538update-manager (1:18.04.11.6) bionic; urgency=medium
539
540 * Keep or delete packages after looping over all of them.
541 This prevents the resolver from changing the packages in the loop resulting
542 in not keeping some phased packages back from being upgraded. (LP: #1072136)
543 * Stop lazy import of InstallBackends.
544 Lazy imports made update-manager crash when an update-manager
545 update changed the backend API and an updated incompatible backend
546 was loaded to the not updated running update-manager process. (LP: #1795898)
547 * Cancel transaction on exit only when Cancel button is active.
548 Also ignore exception when cancellation fails. (LP: #1790670)
549
550 -- Balint Reczey <rbalint@ubuntu.com> Thu, 04 Oct 2018 21:33:57 +0200
551
552update-manager (1:18.04.11.5) bionic; urgency=medium
553>>>>>>> debian/changelog
452554
453 * Print transaction error and let the user try again applying updates555 * Print transaction error and let the user try again applying updates
454 (LP: #1317164)556 (LP: #1317164)
@@ -460,6 +562,7 @@ update-manager (1:18.10.8) cosmic; urgency=medium
460 a race condition where packages to be removed are already removed.562 a race condition where packages to be removed are already removed.
461 (LP: #1791931)563 (LP: #1791931)
462564
565<<<<<<< debian/changelog
463 -- Balint Reczey <rbalint@ubuntu.com> Tue, 11 Sep 2018 13:40:57 +0200566 -- Balint Reczey <rbalint@ubuntu.com> Tue, 11 Sep 2018 13:40:57 +0200
464567
465update-manager (1:18.10.7) cosmic; urgency=medium568update-manager (1:18.10.7) cosmic; urgency=medium
@@ -492,10 +595,22 @@ update-manager (1:18.10.4) cosmic; urgency=medium
492 -- Brian Murray <brian@ubuntu.com> Fri, 31 Aug 2018 15:38:33 -0700595 -- Brian Murray <brian@ubuntu.com> Fri, 31 Aug 2018 15:38:33 -0700
493596
494update-manager (1:18.10.3) cosmic; urgency=medium597update-manager (1:18.10.3) cosmic; urgency=medium
598=======
599 -- Balint Reczey <rbalint@ubuntu.com> Mon, 17 Sep 2018 17:16:38 +0200
600
601update-manager (1:18.04.11.4) bionic; urgency=medium
602
603 * Adjust dates in hwe-support-status for bionic (LP: #1775236)
604
605 -- Julian Andres Klode <juliank@ubuntu.com> Fri, 20 Jul 2018 12:26:28 +0200
606
607update-manager (1:18.04.11.3) bionic; urgency=medium
608>>>>>>> debian/changelog
495609
496 * Add support for HTTPS proxies; this breaks UpdateManager.Core.utils.init_proxy()610 * Add support for HTTPS proxies; this breaks UpdateManager.Core.utils.init_proxy()
497 API - the return value is now a dict, rather than a string (LP: #1771914).611 API - the return value is now a dict, rather than a string (LP: #1771914).
498612
613<<<<<<< debian/changelog
499 -- Julian Andres Klode <juliank@ubuntu.com> Wed, 27 Jun 2018 14:16:45 +0200614 -- Julian Andres Klode <juliank@ubuntu.com> Wed, 27 Jun 2018 14:16:45 +0200
500615
501update-manager (1:18.10.2) cosmic; urgency=medium616update-manager (1:18.10.2) cosmic; urgency=medium
@@ -511,6 +626,24 @@ update-manager (1:18.10.1) cosmic; urgency=medium
511 initial analysis of this bug. (LP: #1637180)626 initial analysis of this bug. (LP: #1637180)
512627
513 -- Mathieu Trudel-Lapierre <cyphermox@ubuntu.com> Mon, 28 May 2018 10:03:52 -0400628 -- Mathieu Trudel-Lapierre <cyphermox@ubuntu.com> Mon, 28 May 2018 10:03:52 -0400
629=======
630 -- Julian Andres Klode <juliank@ubuntu.com> Fri, 29 Jun 2018 14:44:16 +0200
631
632update-manager (1:18.04.11.2) bionic; urgency=medium
633
634 * Fix my embarassing typo that makes update-manager report crashes, when
635 instanciating the "reboot" dialog and mangling signals. (LP: #1774131)
636
637 -- Mathieu Trudel-Lapierre <cyphermox@ubuntu.com> Fri, 08 Jun 2018 11:50:10 -0700
638
639update-manager (1:18.04.11.1) bionic; urgency=medium
640
641 * Block style context changed signal while enforcing the main window's
642 constant size. Thanks to Thomas Waldmann and Sebastien Bacher for the
643 initial analysis of this bug. (LP: #1637180)
644
645 -- Mathieu Trudel-Lapierre <cyphermox@ubuntu.com> Mon, 28 May 2018 10:13:12 -0400
646>>>>>>> debian/changelog
514647
515update-manager (1:18.04.11) bionic; urgency=medium648update-manager (1:18.04.11) bionic; urgency=medium
516649
diff --git a/debian/control b/debian/control
index c481028..aaf080a 100644
--- a/debian/control
+++ b/debian/control
@@ -9,8 +9,11 @@ Build-Depends: debhelper (>= 9),
9 python3-all (>= 3.3.0-2),9 python3-all (>= 3.3.0-2),
10 python3-dbus,10 python3-dbus,
11 python3-distro-info,11 python3-distro-info,
12<<<<<<< debian/control
12 python3-distupgrade,13 python3-distupgrade,
13 python3-distutils-extra (>= 2.38),14 python3-distutils-extra (>= 2.38),
15=======
16>>>>>>> debian/control
14 python3-gi (>= 3.8),17 python3-gi (>= 3.8),
15 python3-yaml,18 python3-yaml,
16Build-Depends-Indep: intltool,19Build-Depends-Indep: intltool,
diff --git a/hwe-support-status b/hwe-support-status
index fd484a3..fa14477 100755
--- a/hwe-support-status
+++ b/hwe-support-status
@@ -42,8 +42,13 @@ UNSUPPORTED_KERNEL_IMAGE_REGEX = (
42)42)
4343
44# HWE stack with a long support period44# HWE stack with a long support period
45<<<<<<< hwe-support-status
45HWE_SUPPORTED_BACKPORT = "-hwe-22.04"46HWE_SUPPORTED_BACKPORT = "-hwe-22.04"
46SUPPORTED_KERNEL_IMAGE_REGEX = r"^$" # No fixed backported kernel yet47SUPPORTED_KERNEL_IMAGE_REGEX = r"^$" # No fixed backported kernel yet
48=======
49HWE_SUPPORTED_BACKPORT = "-hwe-18.04"
50SUPPORTED_KERNEL_IMAGE_REGEX = r'^$' # No fixed backported kernel yet
51>>>>>>> hwe-support-status
4752
4853
49KERNEL_METAPKGS = (54KERNEL_METAPKGS = (
diff --git a/tests/test_backend_error.py b/tests/test_backend_error.py
index 38785cb..611bf0f 100644
--- a/tests/test_backend_error.py
+++ b/tests/test_backend_error.py
@@ -5,14 +5,26 @@ import logging
5import mock5import mock
6import sys6import sys
7import unittest7import unittest
8<<<<<<< tests/test_backend_error.py
8from mock import patch9from mock import patch
910
10import os11import os
1112
13=======
14from gettext import gettext as _
15from mock import patch
16
17from UpdateManager.Dialogs import NoUpdatesDialog
18from UpdateManager.UpdateManager import UpdateManager
19from UpdateManager.UpdatesAvailable import UpdatesAvailable
20
21import os
22>>>>>>> tests/test_backend_error.py
12CURDIR = os.path.dirname(os.path.abspath(__file__))23CURDIR = os.path.dirname(os.path.abspath(__file__))
1324
1425
15class TestBackendError(unittest.TestCase):26class TestBackendError(unittest.TestCase):
27<<<<<<< tests/test_backend_error.py
16 def setUp(self):28 def setUp(self):
17 os.environ["UPDATE_MANAGER_FORCE_BACKEND_APTDAEMON"] = "1"29 os.environ["UPDATE_MANAGER_FORCE_BACKEND_APTDAEMON"] = "1"
1830
@@ -32,11 +44,35 @@ class TestBackendError(unittest.TestCase):
32 update.side_effect = lambda: update_backend._action_done(44 update.side_effect = lambda: update_backend._action_done(
33 InstallBackend.ACTION_UPDATE, True, False, "string", "desc"45 InstallBackend.ACTION_UPDATE, True, False, "string", "desc"
34 )46 )
47=======
48
49 def setUp(self):
50 os.environ['UPDATE_MANAGER_FORCE_BACKEND_APTDAEMON'] = '1'
51
52 def clear_environ():
53 del os.environ['UPDATE_MANAGER_FORCE_BACKEND_APTDAEMON']
54
55 self.addCleanup(clear_environ)
56
57 @patch('UpdateManager.backend.InstallBackendAptdaemon.update')
58 def test_backend_error(self, update):
59 main = mock.MagicMock()
60 main.datadir = os.path.join(CURDIR, '..', 'data')
61
62 from UpdateManager.backend import (InstallBackend, get_backend)
63 update_backend = get_backend(main, InstallBackend.ACTION_UPDATE)
64 update.side_effect = lambda: update_backend._action_done(
65 InstallBackend.ACTION_UPDATE, True, False, "string", "desc")
66>>>>>>> tests/test_backend_error.py
35 update_backend.start()67 update_backend.start()
36 main.start_error.assert_called_once_with(True, "string", "desc")68 main.start_error.assert_called_once_with(True, "string", "desc")
3769
3870
71<<<<<<< tests/test_backend_error.py
39if __name__ == "__main__":72if __name__ == "__main__":
73=======
74if __name__ == '__main__':
75>>>>>>> tests/test_backend_error.py
40 if len(sys.argv) > 1 and sys.argv[1] == "-v":76 if len(sys.argv) > 1 and sys.argv[1] == "-v":
41 logging.basicConfig(level=logging.DEBUG)77 logging.basicConfig(level=logging.DEBUG)
42 unittest.main()78 unittest.main()
diff --git a/tests/test_hwe_support_status.py b/tests/test_hwe_support_status.py
index e811ef9..a4449eb 100644
--- a/tests/test_hwe_support_status.py
+++ b/tests/test_hwe_support_status.py
@@ -153,8 +153,12 @@ class HweSupportStatusTestCase(TestCase):
153 text = mock_print.call_args[0][0]153 text = mock_print.call_args[0][0]
154 print("43242343243", mock_print.call_count)154 print("43242343243", mock_print.call_count)
155 self.assertIn(155 self.assertIn(
156<<<<<<< tests/test_hwe_support_status.py
156 "Your system is supported until April 2027", text157 "Your system is supported until April 2027", text
157 )158 )
159=======
160 "Your system is supported until April 2023", text)
161>>>>>>> tests/test_hwe_support_status.py
158162
159 def test_advice_about_hwe_status_supported_hwe_stack(self):163 def test_advice_about_hwe_status_supported_hwe_stack(self):
160 with patch("hwe_support_status.is_unsupported_hwe_running") as m:164 with patch("hwe_support_status.is_unsupported_hwe_running") as m:
@@ -174,9 +178,13 @@ class HweSupportStatusTestCase(TestCase):
174 text = mock_print.call_args[0][0]178 text = mock_print.call_args[0][0]
175 self.assertIn(179 self.assertIn(
176 "Your Hardware Enablement Stack (HWE) is supported "180 "Your Hardware Enablement Stack (HWE) is supported "
181<<<<<<< tests/test_hwe_support_status.py
177 "until April 2027",182 "until April 2027",
178 text,183 text,
179 )184 )
185=======
186 "until April 2023", text)
187>>>>>>> tests/test_hwe_support_status.py
180188
181189
182if __name__ == "__main__":190if __name__ == "__main__":
diff --git a/tests/test_meta_release_core.py b/tests/test_meta_release_core.py
index 954a0ba..37af4ae 100644
--- a/tests/test_meta_release_core.py
+++ b/tests/test_meta_release_core.py
@@ -121,6 +121,18 @@ class TestMetaReleaseCore(unittest.TestCase):
121 "download https with no proxy failed",121 "download https with no proxy failed",
122 )122 )
123123
124 @unittest.skipUnless(url_downloadable(
125 "https://ubuntu.com", logging.debug),
126 "Could not reach https test site")
127 def test_https_url_downloadable(self):
128 with EnvironmentVarGuard() as environ:
129 logging.debug("no proxy, https address")
130 del environ["http_proxy"]
131 install_opener(None)
132 self.assertTrue(url_downloadable("https://ubuntu.com",
133 logging.debug),
134 "download https with no proxy failed")
135
124 def test_url_downloadable(self):136 def test_url_downloadable(self):
125 from UpdateManager.Core.utils import url_downloadable137 from UpdateManager.Core.utils import url_downloadable
126138
@@ -154,12 +166,18 @@ class TestMetaReleaseCore(unittest.TestCase):
154 )166 )
155167
156 logging.debug("no proxy, no valid address")168 logging.debug("no proxy, no valid address")
169<<<<<<< tests/test_meta_release_core.py
157 self.assertFalse(170 self.assertFalse(
158 url_downloadable(171 url_downloadable(
159 "http://archive.ubuntu.com/xxx", logging.debug172 "http://archive.ubuntu.com/xxx", logging.debug
160 ),173 ),
161 "download with no proxy failed",174 "download with no proxy failed",
162 )175 )
176=======
177 self.assertFalse(url_downloadable("http://archive.ubuntu.com/xxx",
178 logging.debug),
179 "download with no proxy failed")
180>>>>>>> tests/test_meta_release_core.py
163181
164 logging.debug("proxy, no valid address")182 logging.debug("proxy, no valid address")
165 environ["http_proxy"] = "http://localhost:%s" % self.port183 environ["http_proxy"] = "http://localhost:%s" % self.port
@@ -186,7 +204,11 @@ class TestMetaReleaseCore(unittest.TestCase):
186 supported for supported in di.supported() if di.is_lts(supported)204 supported for supported in di.supported() if di.is_lts(supported)
187 ]205 ]
188 with EnvironmentVarGuard() as environ:206 with EnvironmentVarGuard() as environ:
207<<<<<<< tests/test_meta_release_core.py
189 environ["META_RELEASE_FAKE_CODENAME"] = ltses[-2]208 environ["META_RELEASE_FAKE_CODENAME"] = ltses[-2]
209=======
210 environ["META_RELEASE_FAKE_CODENAME"] = "bionic"
211>>>>>>> tests/test_meta_release_core.py
190 meta = MetaReleaseCore(forceDownload=True)212 meta = MetaReleaseCore(forceDownload=True)
191 while meta.downloading:213 while meta.downloading:
192 time.sleep(0.1)214 time.sleep(0.1)
diff --git a/tests/test_pep8.py b/tests/test_pep8.py
193new file mode 100644215new file mode 100644
index 0000000..5127dfe
--- /dev/null
+++ b/tests/test_pep8.py
@@ -0,0 +1,42 @@
1<<<<<<< tests/test_pep8.py
2=======
3#!/usr/bin/python3
4# -*- Mode: Python; indent-tabs-mode: nil; tab-width: 4; coding: utf-8 -*-
5
6import os
7import subprocess
8import unittest
9
10# pep8 is overdoing it a bit IMO
11IGNORE_PEP8 = "E265,E402,W503"
12IGNORE_FILES = (
13)
14
15
16class TestPep8Clean(unittest.TestCase):
17 """ ensure that the tree is pep8 clean """
18
19 def test_pep8_clean(self):
20 CURDIR = os.path.dirname(os.path.abspath(__file__))
21 py_files = set()
22 for dirpath, dirs, files in os.walk(os.path.join(CURDIR, "..")):
23 for f in files:
24 if os.path.splitext(f)[1] != ".py":
25 continue
26 # islink to avoid running pep8 on imported files
27 # that are symlinks to other packages
28 if os.path.islink(os.path.join(dirpath, f)):
29 continue
30 if f in IGNORE_FILES:
31 continue
32 py_files.add(os.path.join(dirpath, f))
33 ret_code = subprocess.call(
34 ["pep8", "--ignore={0}".format(IGNORE_PEP8)] + list(py_files))
35 self.assertEqual(0, ret_code)
36
37
38if __name__ == "__main__":
39 import logging
40 logging.basicConfig(level=logging.DEBUG)
41 unittest.main()
42>>>>>>> tests/test_pep8.py
diff --git a/tests/test_proxy.py b/tests/test_proxy.py
index 266f173..1146fb4 100644
--- a/tests/test_proxy.py
+++ b/tests/test_proxy.py
@@ -31,16 +31,24 @@ class TestInitProxy(unittest.TestCase):
31 apt_pkg.config.set("Acquire::http::proxy", self.proxy)31 apt_pkg.config.set("Acquire::http::proxy", self.proxy)
32 apt_pkg.config.set("Acquire::https::proxy", self.https_proxy)32 apt_pkg.config.set("Acquire::https::proxy", self.https_proxy)
33 from gi.repository import Gio33 from gi.repository import Gio
34<<<<<<< tests/test_proxy.py
3435
35 settings = Gio.Settings.new("com.ubuntu.update-manager")36 settings = Gio.Settings.new("com.ubuntu.update-manager")
36 detected_proxy = init_proxy(settings)37 detected_proxy = init_proxy(settings)
37 self.assertEqual(38 self.assertEqual(
38 detected_proxy, {"http": self.proxy, "https": self.https_proxy}39 detected_proxy, {"http": self.proxy, "https": self.https_proxy}
39 )40 )
41=======
42 settings = Gio.Settings.new("com.ubuntu.update-manager")
43 detected_proxy = init_proxy(settings)
44 self.assertEqual(detected_proxy, {"http": self.proxy,
45 "https": self.https_proxy})
46>>>>>>> tests/test_proxy.py
4047
41 def testinitproxyHttpOnly(self):48 def testinitproxyHttpOnly(self):
42 apt_pkg.config.set("Acquire::http::proxy", self.proxy)49 apt_pkg.config.set("Acquire::http::proxy", self.proxy)
43 from gi.repository import Gio50 from gi.repository import Gio
51<<<<<<< tests/test_proxy.py
4452
45 settings = Gio.Settings.new("com.ubuntu.update-manager")53 settings = Gio.Settings.new("com.ubuntu.update-manager")
46 detected_proxy = init_proxy(settings)54 detected_proxy = init_proxy(settings)
@@ -50,6 +58,29 @@ class TestInitProxy(unittest.TestCase):
5058
51 def testinitproxyHttpOnlyWithHttpsUri(self):59 def testinitproxyHttpOnlyWithHttpsUri(self):
52 apt_pkg.config.set("Acquire::http::proxy", self.https_proxy)60 apt_pkg.config.set("Acquire::http::proxy", self.https_proxy)
61=======
62 settings = Gio.Settings.new("com.ubuntu.update-manager")
63 detected_proxy = init_proxy(settings)
64 self.assertEqual(detected_proxy, {"http": self.proxy,
65 "https": self.proxy})
66
67 def testinitproxyHttpOnlyWithHttpsUri(self):
68 apt_pkg.config.set("Acquire::http::proxy", self.https_proxy)
69 from gi.repository import Gio
70 settings = Gio.Settings.new("com.ubuntu.update-manager")
71 detected_proxy = init_proxy(settings)
72 self.assertEqual(detected_proxy, {"http": self.https_proxy,
73 "https": self.https_proxy})
74
75 def testinitproxyHttpsOnly(self):
76 apt_pkg.config.set("Acquire::https::proxy", self.https_proxy)
77 from gi.repository import Gio
78 settings = Gio.Settings.new("com.ubuntu.update-manager")
79 detected_proxy = init_proxy(settings)
80 self.assertEqual(detected_proxy, {"https": self.https_proxy})
81
82 def testinitproxyNoProxy(self):
83>>>>>>> tests/test_proxy.py
53 from gi.repository import Gio84 from gi.repository import Gio
5485
55 settings = Gio.Settings.new("com.ubuntu.update-manager")86 settings = Gio.Settings.new("com.ubuntu.update-manager")
diff --git a/tests/test_update_error.py b/tests/test_update_error.py
index c7b2eda..1daa99f 100644
--- a/tests/test_update_error.py
+++ b/tests/test_update_error.py
@@ -41,12 +41,20 @@ class TestUpdateManagerError(unittest.TestCase):
41 self.manager, 1, error_occurred=True41 self.manager, 1, error_occurred=True
42 )42 )
43 self.assertIsInstance(p, UpdatesAvailable)43 self.assertIsInstance(p, UpdatesAvailable)
44<<<<<<< tests/test_update_error.py
44 self.assertEqual(45 self.assertEqual(
45 p.custom_desc, _("Some software couldn’t be checked for updates.")46 p.custom_desc, _("Some software couldn’t be checked for updates.")
46 )47 )
4748
4849
49if __name__ == "__main__":50if __name__ == "__main__":
51=======
52 self.assertEqual(p.custom_desc,
53 _("Some software couldn’t be checked for updates."))
54
55
56if __name__ == '__main__':
57>>>>>>> tests/test_update_error.py
50 if len(sys.argv) > 1 and sys.argv[1] == "-v":58 if len(sys.argv) > 1 and sys.argv[1] == "-v":
51 logging.basicConfig(level=logging.DEBUG)59 logging.basicConfig(level=logging.DEBUG)
52 unittest.main()60 unittest.main()

Subscribers

People subscribed via source and target branches