Univention Bugzilla – Bug 49061
More flexible version information in univention-upgrade
Last modified: 2022-03-09 13:43:41 CET
Running root@backup:~# univention-upgrade --ignoreterm --ignoressh --updateto=4.4.0 will fail with a traceback: Starting univention-upgrade. Current UCS version is 4.3-3 errataX 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 437, in do_update update_available = performUpdate(options, checkForUpdates=options.check, silent=False) File "/usr/sbin/univention-upgrade", line 138, in performUpdate if func(options, checkForUpdates, silent): File "/usr/sbin/univention-upgrade", line 154, 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 61, in __init__ self.set(version) File "/usr/lib/pymodules/python2.7/univention/updater/ucs_version.py", line 94, in set raise ValueError('string does not match UCS version pattern') ValueError: string does not match UCS version pattern As there is sometimes an issue with numbering schema we should allow both types of version strings: 4.4-0 as well as 4.4.0 Or at least print a useable message instead of a traceback.
*** Bug 49464 has been marked as a duplicate of this bug. ***
1. print a proper error message 2. Bring an example of valid string with --help
We discussed some changes, which were added to the merge request. Everything looks good now, please merge and build the package.
Issue has been resolved: 1. Check of correct UCS version has been put to the start of upgrader 2. Univention lib change: raising ValueError contains now errounous input, which caused valueError 3. Added new test: test_upgrade.py 4. Adapted build process: added python3-univention-admin-diary to build dependencies univention-lib: 9.0.11-10A~5.0.0.202202251627 univention-updater: 15.0.3-77A~5.0.0.202202281042 3b2681d13a Bug #49061: added pycharm .idea to gitignore f28c3f4bea Bug #49061: validating updateto param in parsing method now, sysexit(1) on wrong param 10bbf1187e Bug #49061: added simple test for upgrade.py c0485ad4ec Bug #49061: excluding unit test from execution for python 2 4f0eed89df Bug #49061: extended Msg text of ValueError in UCS Version. Including input now. c56ac8bfe6 Bug #49061: extended Msg of test skip test_upgrade.py 9c85f16e54 Bug #49061: updated univention-updater yaml 5aae5ff90f Bug #49061: added univention-lib yaml a325efbe21 Bug #49061: debian changelog for univention-updater 9c863abce8 Bug #49061: debian changelog for univention-lib 2382640da9 Bug #49061: Merge branch 'ssefidrodi/49061-more-flexible-version-information-in-univention-upgrade' into 5.0-1 54fdf6cf4b Bug #49061: spaces to tabs + string in one line 447af5ff65 Bug #49061 more flexible version information in univention upgrade 7919a8fd56 Bug #49061: yaml c845a537a1 Bug #49061: univention-lib.yaml update
Fixed Style Issues and rebuilt package: 06c359b5ac Bug #49061: fixed style, flake8 compliant now 4974ed158a Bug #49061: yaml univention-updater: 15.0.3-77A~5.0.0.202202281208
OK: u-upgrade: Parameter syntax in --help output OK: u-upgrade: Exit early when wrong parameter value is given OK: yaml, i adjusted the line length (max 78) OK: u-lib: Include parameter value when raising an exception Verified
<https://errata.software-univention.de/#/?erratum=5.0x241> <https://errata.software-univention.de/#/?erratum=5.0x242>