Univention Bugzilla – Bug 55658
Different results from supports_ucs_version and must_have_fitting_ucs_version
Last modified: 2023-02-03 13:28:01 CET
Different results from supports_ucs_version and must_have_fitting_ucs_version As far as I understand it, the "supports_ucs_version" function decides if an app will be shown in the appcenter while "must_have_fitting_ucs_version" is used to decide if an app can be installed. Should they return different results? It strikes me as a bit odd. For docker apps that means I can install an unsupported version, using the myApp=$Unsupported_Version syntax. Package apps fail to install because the repository will not be added for an unsupported version, you don't get any error message why it wasn't added. Example on a 5.0-2 system: ``` In [11]: from univention.appcenter.app import App In [17]: myApp = App({}, None, id="foo", supported_ucs_versions=["4.4-0"]) In [18]: myApp.must_have_fitting_ucs_version() Out[18]: True In [19]: myApp.supports_ucs_version() Out[19]: False #### In [20]: myApp = App({}, None, id="foo", supported_ucs_versions=["5.2-0"]) In [21]: myApp.supports_ucs_version() Out[21]: False In [22]: myApp.must_have_fitting_ucs_version() Out[22]: True ### In [23]: myApp = App({}, None, id="foo", supported_ucs_versions=["5.0-0"]) In [24]: myApp.must_have_fitting_ucs_version() Out[24]: True In [26]: myApp.supports_ucs_version() Out[26]: True ``` must_have_fitting_ucs_version -> https://git.knut.univention.de/univention/ucs/-/blob/5.0-3/management/univention-appcenter/python/appcenter/app.py#L1355 supports_ucs_version -> https://git.knut.univention.de/univention/ucs/-/blob/5.0-3/management/univention-appcenter/python/appcenter/app.py#L1186