Univention Bugzilla – Bug 49464
Improve univention-upgrade reading of version string
Last modified: 2019-05-14 12:13:19 CEST
USing univention-upgrade with wrong version string will call a traceback instead of a proper error message: root@master42:~# univention-upgrade --updateto=4.3.6 --ignoressh --ignoreterm Starting univention-upgrade. Current UCS version is 4.3-4 errata496 Checking for local repository: none Checking for package updates: none Checking for app updates: none Checking for release updates: An error occurred - see "/var/log/univention/updater.log" for details root@master42:~# less /var/log/univention/updater.log Starting univention-upgrade. Current UCS version is 4.3-4 errata496 Checking for local repository: none Checking for package updates: none Checking for app updates: none Checking for release updates: Traceback in univention-upgrade: Traceback (most recent call last): File "/usr/sbin/univention-upgrade", line 434, in do_update update_available = performUpdate(options, checkForUpdates=options.check, silent=False) File "/usr/sbin/univention-upgrade", line 136, in performUpdate if func(options, checkForUpdates, silent): File "/usr/sbin/univention-upgrade", line 152, in do_release_update if options.updateto and UCS_Version(options.updateto) < UCS_Version(version_next): File "/usr/lib/pymodules/python2.7/univention/updater/ucs_version.py", line 63, in __init__ self.set(version) File "/usr/lib/pymodules/python2.7/univention/updater/ucs_version.py", line 104, in set raise ValueError('string does not match UCS version pattern') ValueError: string does not match UCS version pattern We should impelemnt one of these options: 1. print a proper error message 2. Bring an example of valid string with --help 3. Just map 4.3.3 to 4.3-4
*** This bug has been marked as a duplicate of bug 49061 ***