Univention Bugzilla – Bug 41237
univention-upgrade with --updateto is broken
Last modified: 2016-09-29 17:29:26 CEST
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)
r69233 | Bug #41237: Fix comparison of --updateto ucs-test still uses /u/s/u/univention-update r69234 | Bug #41237 up: Bump package version to guarantee 4.1-2 is newer than 4.1-1 Package: univention-updater Version: 11.0.10-1.1473.201605101337 Branch: ucs_4.1-0 Scope: ucs4.1-2 # isoinfo -R -f -i ucs_4.1-2-20160510-133954-dvd-amd64.iso | grep univention-updater /all/univention-updater_11.0.10-1.1473.201605101337_all.deb # isoinfo -R -f -i ucs_update_4.1-1_-_4.1-2-20160510-133954-dvd-amd64.iso | grep univention-updater /ucs-updates/4.1-2/univention-updater_11.0.10-1.1473.201605101337_all.deb r69236 | Bug #41237 up: Fix comparison of --updateto CL
OK: Patch applied OK: Update to new updater 11.0.10-1.1473.201605101337 OK: univention-upgrade --updateto 4.1-99 OK: version larger than in UCS 4.1-1 errata OK: Changelog -> Verified
UCS 4.1-2 has been released: https://docs.software-univention.de/release-notes-4.1-2-en.html https://docs.software-univention.de/release-notes-4.1-2-de.html If this error occurs again, please use "Clone This Bug".