Univention Bugzilla – Bug 41238
univention-upgrade with --updateto is broken
Last modified: 2016-10-04 13:56:58 CEST
Backport to 4.1-1 +++ This bug was initially created as a clone of Bug #41237 +++ With r67588 univention-upgrade was modified to improve the update process. This introduced the following problem: If --updateto is used, the updater checks if the target UCS version is reached, but this comparison is broken, leading to the following traceback: Traceback (most recent call last): File "/usr/sbin/univention-upgrade", line 429, in do_update update_available = performUpdate(options, checkForUpdates=options.check, silent=False) File "/usr/sbin/univention-upgrade", line 137, in performUpdate if func(options, checkForUpdates, silent): File "/usr/sbin/univention-upgrade", line 153, in do_release_update if options.updateto and UCS_Version(options.updateto) < version_next: File "/usr/lib/pymodules/python2.7/univention/updater/ucs_version.py", line 88, in __cmp__ return cmp(self.mmp, right.mmp) AttributeError: 'str' object has no attribute 'mmp' The following patch fixes the issue for me by converting the string to a UCS_Version object: Index: python/univention-upgrade =================================================================== --- python/univention-upgrade (Revision 69228) +++ python/univention-upgrade (Arbeitskopie) @@ -150,7 +150,7 @@ if not version_next: dprint(silent, 'none') return False - if options.updateto and UCS_Version(options.updateto) < version_next: + if options.updateto and UCS_Version(options.updateto) < UCS_Version(version_next): dprint(silent, '%s is available but updater has been instructed to stop at version %s.' % (version_next, options.updateto)) return False dprint(silent, 'found: UCS %s' % version_next)
r69235 | Bug #41238: Fix comparison of --updateto Package: univention-updater Version: 11.0.9-10.1474.201605101346 Branch: ucs_4.1-0 Scope: errata4.1-1 r69237 | Bug #41238 up: Fix comparison of --updateto YAML univention-updater.yaml
OK: Patch applied OK: Update to new updater 11.0.9-10.1474.201605101346 OK: univention-upgrade --updateto 4.1-99 - Works with old updater (new version is installed, then dist-upgrade happens) - Works with new updater OK: version smaller than in UCS 4.1-2 OK: yaml -> Verified
<http://errata.software-univention.de/ucs/4.1/175.html>