Univention Bugzilla – Bug 37539
add RequiredAppsDomain (app is required, but not on the localhost )
Last modified: 2016-02-04 14:10:47 CET
We should add an ini option RequiredAppsDomain. The apps in RequiredAppsDomain are required for the app, but it is sufficient if they are available in the domain (rather than on the localhost, as RequiredApps). e.g. horde app and mailserver app, horde can be installed on a different server
see ticket #2014110821000113
Interesting for Ticket#2015051421000022, but required.
Needs to be implemented in the old and the new App class. univention-appcenter 5.0.19-24.84.201512101750 RequiredAppsInDomain=app1,app2 Can be combined with ConflictedApps=app1 which will result in a slightly different error message. Checks whether the specified app is installed before installation. Checks whether it is the last installation when apps are installed that rely on it.
Improved in univention-appcenter 5.0.19-28.86.201512140023
appcenter-test: horde_20150804.ini - RequiredAppsInDomain=mailserver, dudle-docker, fetchmail,drbd dudle-docker.ini - RequiredAppsInDomain=mailserver FAIL - tried to remove a app (horde with RequiredAppsInDomain=mailserver, dudle-docker, fetchmail,drbd ) on a slave/master Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/management/console/base.py", line 283, in execute function(self, request) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/__init__.py", line 300, in invoke_dry_run self.invoke(request) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 656, in _decorated return function(self, request, *args, **kwargs) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/decorators.py", line 190, in _response return function(self, request) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/__init__.py", line 478, in invoke forbidden, warnings = application.check_invokation(function, self.package_manager) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/app_center.py", line 1216, in check_invokation return _check(True), _check(False) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/app_center.py", line 1212, in _check reason = method(**kwargs) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/app_center.py", line 1163, in must_not_be_depended_on apps = [app for app in Application.get_all_apps() if self.id in app.get('requiredappsindomain')] AttributeError: type object 'Application' has no attribute 'get_all_apps' FAIL - at some point python-simplejson was deinstalled (due to apt-get autoremove?) and UMC appcenter wasn't usable any longer failed to load module appcenter: No module named simplejson Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 100, in _load_module self.__module = __import__(file_, [], [], modname) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/__init__.py", line 67, in <module> from app_center import Application, AppcenterServerContactFailed, LICENSE File "/usr/lib/pymodules/python2.7/univention/management/console/modules/appcenter/app_center.py", line 68, in <module> from simplejson import loads ImportError: No module named simplejson univention-management-console-module-appcenter should depends on python-simplejson (this has probably nothing to do with this bug, but can easily fixed) FAIL - error message in UMC all i get in UMC is Error performing the action The requested action cannot be carried out. Please consider the information listed below in order to resolve the problem and try again. [Cancel] this does not help very much. univention-add app says (must_have_no_unmet_dependencies) The application requires the following applications: [{'local_allowed': True, 'in_domain': True, 'id': 'mailserver', 'name': 'Mailserver'}] Unable to install dudle-docker. Aborting OK - RequiredAppsInDomain=mailserver (in dudle-docker) * installation forbidden * installed mailserver on a different ucs server * installation ok OK - RequiredAppsInDomain=mailserver, dudle-docker, fetchmail,drbd (in horde) * installation forbidden * installed apps on different ucs servers * installation ok
AppCenter uses simplejson while not depending on it. The reason why this occurs now is that I removed it from system-setup which currently causes a lot of these errors (e.g. also in ucs-test).
I changed simplejson → json in svn r66433 so that the QA doesn't need to wait until Dirk is back.
there is one more issue with the patch
Should be fixed in univention-appcenter 5.0.19-33
FAIL - remove app with dependecies * if i install app A (on server1) that depends on app B (on server1) i can't remove app B as long as app A is installed - OK * but, if i installed app B on a different server (server2) and app A on server1, i can remove app B on server2, OK - simplejson (no longer used) OK - error message in UMC Dudle-docker benötigt die folgenden Applikationen. Mailserver (diese Applikation kann auf einem beliebigen Rechner in der Domäne installiert werden) OK - RequiredAppsInDomain=mailserver (in dudle-docker) OK - RequiredAppsInDomain=mailserver, dudle-docker, fetchmail,drbd (in horde)
I tried to reproduce it without success. In my tests, it worked. Could you please try again?
(In reply to Dirk Wiesenthal from comment #11) > I tried to reproduce it without success. In my tests, it worked. Could you > please try again? Yes, me neither (removed the wrong app) OK - YAML
Also interesting to have that feature for Ticket#2016012021000212.
<http://errata.software-univention.de/ucs/4.1/79.html>