[Bug 1990450] Re: Show potential Ubuntu Pro updates and apt news messages
Andreas Hasenack
1990450 at bugs.launchpad.net
Thu Mar 14 21:26:38 UTC 2024
I mistakenly released this for xenial without noticing there are DEP8
errors in that ubuntu release. For some reason, they were not added as a
comment to this bug, I suppose it has something to do with xenial being
very much out of standard support.
In any case, the errors are:
256s autopkgtest [13:46:29]: test nose-tests: [-----------------------
256s
256s ** (nosetests3:7312): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
256s /tmp/autopkgtest.cAx6Rc/build.PMT/src/UpdateManager/Dialogs.py:25: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
256s from gi.repository import Gtk
261s ................................................./tmp/autopkgtest.cAx6Rc/build.PMT/src/tests/../UpdateManager/Dialogs.py:195:1: E302 expected 2 blank lines, found 1
261s /tmp/autopkgtest.cAx6Rc/build.PMT/src/tests/../UpdateManager/UpdateManager.py:234:80: E501 line too long (99 > 79 characters)
269s F......E...E.............................
269s ======================================================================
269s ERROR: test_no_stop_no_updates (test_stop_update.TestStopUpdate)
269s ----------------------------------------------------------------------
269s Traceback (most recent call last):
269s File "/tmp/autopkgtest.cAx6Rc/build.PMT/src/tests/test_stop_update.py", line 34, in test_no_stop_no_updates
269s cancelled_update=False)
269s File "/tmp/autopkgtest.cAx6Rc/build.PMT/src/UpdateManager/UpdateManager.py", line 279, in _make_available_pane
269s return HWEUpgradeDialog(self)
269s NameError: name 'HWEUpgradeDialog' is not defined
269s
269s ======================================================================
269s ERROR: test_error_no_updates (test_update_error.TestUpdateManagerError)
269s ----------------------------------------------------------------------
269s Traceback (most recent call last):
269s File "/tmp/autopkgtest.cAx6Rc/build.PMT/src/tests/test_update_error.py", line 31, in test_error_no_updates
269s error_occurred=True)
269s File "/tmp/autopkgtest.cAx6Rc/build.PMT/src/UpdateManager/UpdateManager.py", line 279, in _make_available_pane
269s return HWEUpgradeDialog(self)
269s NameError: name 'HWEUpgradeDialog' is not defined
269s
269s ======================================================================
269s FAIL: test_pep8_clean (test_pep8.TestPep8Clean)
269s ----------------------------------------------------------------------
269s Traceback (most recent call last):
269s File "/tmp/autopkgtest.cAx6Rc/build.PMT/src/tests/test_pep8.py", line 33, in test_pep8_clean
269s self.assertEqual(0, ret_code)
269s AssertionError: 0 != 1
269s
269s ----------------------------------------------------------------------
269s Ran 90 tests in 12.808s
The pep8 one doesn't concern me, but the missing HWEUpgradeDialog does.
This was introduced in 16.04.18, and indeed is not defined anywhere else
in the code.
It was also not seen in the verification, meaning some specific event or
situation needs to exist for that code path to be traversed.
To trigger that code, one has to:
a) apply all available updates
b) not be in a "needs reboot" state
c) configure update-manager to not tell you about a new LTS being available
Then we see the crash, and a bit earlier than in the test actually:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/UpdateManager/backend/InstallBackendAptdaemon.py", line 248, in _on_finished
trans_failed=trans_failed)
File "/usr/lib/python3/dist-packages/UpdateManager/backend/__init__.py", line 95, in _action_done
self.window_main.start_available(is_cancelled_update)
File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 228, in start_available
cancelled_update, error_occurred)
File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 278, in _make_available_pane
elif self.hwe_replacement_packages:
AttributeError: 'UpdateManager' object has no attribute 'hwe_replacement_packages'
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1990450
Title:
Show potential Ubuntu Pro updates and apt news messages
Status in update-manager package in Ubuntu:
Fix Released
Status in update-manager source package in Xenial:
Fix Released
Status in update-manager source package in Bionic:
Fix Released
Status in update-manager source package in Focal:
Fix Released
Status in update-manager source package in Jammy:
Fix Released
Status in update-manager source package in Kinetic:
Fix Released
Status in update-manager source package in Lunar:
Won't Fix
Status in update-manager source package in Mantic:
Won't Fix
Status in update-manager source package in Noble:
Fix Released
Bug description:
[Impact]
Show the Ubuntu Pro (aka Ubuntu Advantage) updates that would be enabled if you attached this machine. This information is not currently shown.
The new revision also update the reference to the Software Properties'
Livepatch tab which doesn't exist anymore since bug #2003527 and was
replaced by Ubuntu Pro.
There is also a new section 'News' showing the apt-news messages if
there are any available and some layout changes to accommodate for the
new section
[Test Case]
1. Do fresh install of Ubuntu with available updates
2. Check there are updates available by running:
$ pro security-status
Note that updates are only available for older LTS releases.
If there are no Pro specific updates available, install any package listed in https://esm.ubuntu.com/apps/ubuntu/dists/jammy-apps-security/main/binary-amd64/Packages (without attaching your machine!)
3. Open update-manager
-> There should be a 'Ubuntu Pro security updates (Enable in
Settings...)' section at the bottom of the updates list showing
disabled and including under it the name of the packages that would be
available if pro was enabled
4. start software-properties, go to the ubuntu pro tab and attach to a pro account
5. close software-properties and restart update-manager
-> There should be a 'Ubuntu Pro security updates' section at the
bottom of the updates list showing enabled and including under it
packages updated provided by pro that can be installed
6. Check the top of the update-manager dialog
If there is a message available on the server
$ curl https://motd.ubuntu.com/aptnews.json
with a timestamp older than one month
then a 'news' section should be displayed including the message
if there isn't a recent post on the server it can be tested locally
with the steps from #31
[Regression Potential]
Possibility of introducing new bugs.
The new livepatch->ubuntu pro string change will not be translated
until the next language pack refresh
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/1990450/+subscriptions
More information about the foundations-bugs
mailing list