Problem: Update to UCS 4.4-0 fails with a traceback

Starting dist-update at Sat May 9 11:40:06 2020…
Starting package upgrade Traceback in univention-upgrade:
Traceback (most recent call last):
File “/usr/sbin/univention-upgrade”, line 441, in do_update
update_available = performUpdate(options, checkForUpdates=options.check, silent=False)

Problem

When trying to upgrade to UCS 4.4-0 the upgrade fails and in /var/log/univention/updater.log you will see a traceback similar to the following:

  File "/usr/sbin/univention-upgrade", line 139, in performUpdate
    if func(options, checkForUpdates, silent):
  File "/usr/sbin/univention-upgrade", line 221, in do_package_updates
    os.environ['ADMINDIARY_CONTEXT'] = context_id
  File "/usr/lib/python2.7/os.py", line 473, in __setitem__
    putenv(key, item)
TypeError: putenv() argument 2 must be string, not None

Environment

You have the Admin Diary app installed on this server.

Solution

This is a bug. In order to upgrade to UCS 4.4-0 you need to do the following:

root@ucs:~ # sed -i "s|os.environ\['ADMINDIARY_CONTEXT'\] = context_id|os.environ\['ADMINDIARY_CONTEXT'\] = str(context_id)|g" \ /usr/sbin/univention-upgrade /usr/share/univention-updater/univention-updater

Mastodon