Bug 49464 - Improve univention-upgrade reading of version string
Improve univention-upgrade reading of version string
Status: RESOLVED DUPLICATE of bug 49061
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-14 11:49 CEST by Christian Völker
Modified: 2019-05-14 12:13 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 1: Cosmetic issue or missing function but workaround exists
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.011
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
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-05-14 11:49:01 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
Comment 1 Florian Best univentionstaff 2019-05-14 12:13:19 CEST

*** This bug has been marked as a duplicate of bug 49061 ***