Univention Bugzilla – Bug 53666
univention-upgrade traceback when updating with updatable apps
Last modified: 2022-02-16 12:06:56 CET
A partner reported the following error when running univention-upgrade: ================================================================== Starting univention-upgrade. Current UCS version is 5.0-0 errata68 Checking for local repository: none Checking for package updates: none Checking for app updates: found The following apps can be upgraded: Wekan: Version 5.41 can be upgraded to 5.48 Starting univention-app upgrade at Thu Aug 12 22:41:37 2021... Most of the output for App upgrades goes to /var/log/univention/appcenter.log Starting app upgrade Traceback in univention-upgrade: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/univention/updater/scripts/upgrade.py", line 430, in do_update update_available = performUpdate(options, checkForUpdates=options.check, silent=False) File "/usr/lib/python3/dist-packages/univention/updater/scripts/upgrade.py", line 139, in performUpdate if func(options, checkForUpdates, silent): File "/usr/lib/python3/dist-packages/univention/updater/scripts/upgrade.py", line 314, in do_app_updates pwdfile=options.pwdfile.name if options.pwdfile else None, File "/usr/lib/python3/dist-packages/univention/appcenter/actions/__init__.py", line 167, in call_safe return cls.call(**kwargs**) File "/usr/lib/python3/dist-packages/univention/appcenter/actions/__init__.py", line 175, in call return obj.call_with_namespace(namespace) File "/usr/lib/python3/dist-packages/univention/appcenter/actions/__init__.py", line 181, in call_with_namespace result = self.main(namespace) File "/usr/lib/python3/dist-packages/univention/appcenter/actions/upgrade.py", line 75, in main for app in apps: TypeError: 'App' object is not iterable ================================================================== Running univention-app upgrade wekan manually worked fine though.
This is not Wekan alone. This is every time univention-upgrade is used with any App installed that could be upgraded. The internal API of "upgrade" has changed. Apparently, we forgot to look for usage of that API in the univention-updater package.
Reported for Jitsi Meet and OpenVPN4UCS as well at Ticket#2021112521000229.
(In reply to Dirk Wiesenthal from comment #1) > This is not Wekan alone. This is every time univention-upgrade is used with > any App installed that could be upgraded. How to reproduce? Just having a app which provides an upgrade? > The internal API of "upgrade" has changed. Apparently, we forgot to look for > usage of that API in the univention-updater package. Where did it change? In an erratum or in UCS 5.0 ? Which bug number?
(In reply to Florian Best from comment #3) > (In reply to Dirk Wiesenthal from comment #1) > > This is not Wekan alone. This is every time univention-upgrade is used with > > any App installed that could be upgraded. > How to reproduce? Just having a app which provides an upgrade? Yes, any App will do > > > The internal API of "upgrade" has changed. Apparently, we forgot to look for > > usage of that API in the univention-updater package. > Where did it change? In an erratum or in UCS 5.0 ? Which bug number? Yes, broken since UCS 5.0-0 errata0. It came with the "you can install multiple Apps at once" feature. The library assumes a list since then (for app in apps)
Univention-updater was causing a Python TypeError because it did not take recent changes to the App Center app upgrade API (from commit 8ad8e47a of Bug #40225) into account. The app upgrade module expects a list of apps instead of a single app. Successful build Package: univention-updater Version: 15.0.3-75A~5.0.0.202202091136 Branch: ucs_5.0-0 Scope: errata5.0-1 c3e36fa5 changes to base/univention-updater/modules/univention/updater/scripts/upgrade.py c5b1a969 yaml
OK: upgrade via univention-upgrade now confirming new API giving apps as list OK: YAML
<https://errata.software-univention.de/#/?erratum=5.0x223>