Univention Bugzilla – Bug 32398
Use dedicated functions for registering the app in univention-add-app
Last modified: 2013-11-19 06:41:20 CET
Bug#31228 introduced app.register(). This should be used in univention-add-app as well. This makes registering an app more robust and gives speedup (currently the app versions are unregistered one by one and the requested app is registered "independently" after that). +++ This bug was initially created as a clone of Bug #31228 +++ Currently, when updating an application, the old component is first removed and then the new component is added. This commits /etc/apt/sources.list.d/20_ucs-online-component.list and /etc/apt/sources.list.d/15_ucs-online-version.list twice and it takes a considerable amount of time. One may speedup the process by removing and adding the component at the same time. Draft for ComponentManager.remove_app(): def remove_app(self, app, super_ucr=None): if super_ucr is None: with set_save_commit_load(self.ucr) as super_ucr: return self.remove_app(app, super_ucr) self._remove(app.component_id, super_ucr) # same for add_app Draft for Application.install(): [...] with set_save_commit_load(ucr) as super_ucr: component_manager.remove_app(old_app, super_ucr) component_manager.put_app(self, super_ucr) # here it gets commited [...]
Necessary because otherwise univention-add-app $UCS_COMPONENT will add some useless (if not harmful) UCR variables.
Created attachment 5401 [details] Use application.register() Patch for univention-add-app
Fixed in: univention-updater 9.0.13-1.1202.201308281243
ok: code ok: changelog 3.2
UCS 3.2 has been released: http://docs.univention.de/release-notes-3.2-en.html http://docs.univention.de/release-notes-3.2-de.html If this error occurs again, please use "Clone This Bug".