Univention Bugzilla – Bug 31228
Speedup update of application
Last modified: 2013-11-19 06:42:17 CET
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)
# same for add_app
Draft for Application.install():
with set_save_commit_load(ucr) as super_ucr:
# here it gets commited
Code was introduced in r42137 and first build in univention-management-console-module-appcenter (3.0.4-1).
Debian changelog file was updated afterwards (r42442) and incorrectly claims this bugfix to be present since 3.0.3-1.
FAIL: during the update process the new repository is added to the sources.list, so both are present. The operation is not atomic, as this bugfix initially promised. REOPEN for further investigation.
Yes, speedup was observable only under certain (mostly synthetic) conditions.
Updated the code to really commit UCR only once during updates. Code for (un)registering an app in UCR had to be rewritten and the patch got more complex than Comment 0 promised - but now it is more reliable (because the logic is in one place and not in every function that wants to register something) and was needed for Bug#32308 anyway.
Removing and adding components during updates is now done in atomic steps: OK
UCS 3.2 has been released:
If this error occurs again, please use "Clone This Bug".