Univention Bugzilla – Bug 56064
update_check_required_ucsschool_version block release update when python3-univention-appcenter is not installed
Last modified: 2023-05-14 06:17:30 CEST
> Checking required_ucsschool_version ... Traceback (most recent call last): > File "<string>", line 4, in <module> > ModuleNotFoundError: No module named 'univention.appcenter' > FAIL ```diff --- base/univention-updater/script/check.sh --- base/univention-updater/script/check.sh @@@ -341,16 +341,15 @@@ update_check_required_ucsschool_version () { # Bug #54883 Bug #54896 - if ! python3 -c ' + python3 -c ' import sys from distutils.version import LooseVersion -from univention.appcenter.app_cache import Apps +try: + from univention.appcenter.app_cache import Apps +except ImportError: + sys.exit(0) ucsschool = Apps().find("ucsschool") -if ucsschool.is_installed(): - sys.exit(LooseVersion(ucsschool.version) <= LooseVersion("5.0 v1")) - '; then - echo "UCS@school is installed. To upgrade to UCS 5.0-2 as least UCS@school 5.0 v2 is required." - echo "Please upgrade the UCS@school app first!" - return 1 - fi +if ucsschool.is_installed() and LooseVersion(ucsschool.version) < LooseVersion("5.0 v2"): + print("UCS@school is installed. To upgrade to UCS 5.0-2 as least UCS@school 5.0 v2 is required.") + print("Please upgrade the UCS@school app first!") + sys.exit(1) } ```
(In reply to Philipp Hahn from comment #0) > + sys.exit(1) Missing one ' there ate the end.