Bug 49061 - More flexible version information in univention-upgrade
More flexible version information in univention-upgrade
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 5.0-1-errata
Assigned To: Siavash Sefid Rodi
Erik Damrose
https://git.knut.univention.de/univen...
:
: 49464 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-03-22 12:58 CET by Christian Völker
Modified: 2022-03-09 13:43 CET (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.046
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2018052521000327
Bug group (optional): bitesize
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Völker univentionstaff 2019-03-22 12:58:25 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.
Comment 1 Florian Best univentionstaff 2019-05-14 12:13:19 CEST
*** Bug 49464 has been marked as a duplicate of this bug. ***
Comment 2 Arvid Requate univentionstaff 2019-05-14 16:24:24 CEST
1. print a proper error message
2. Bring an example of valid string with --help
Comment 3 Erik Damrose univentionstaff 2022-02-25 11:08:46 CET
We discussed some changes, which were added to the merge request. Everything looks good now, please merge and build the package.
Comment 4 Siavash Sefid Rodi univentionstaff 2022-02-28 11:01:35 CET
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
Comment 5 Siavash Sefid Rodi univentionstaff 2022-02-28 12:15:35 CET
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
Comment 6 Erik Damrose univentionstaff 2022-03-01 17:34:50 CET
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