Bug 32398 - Use dedicated functions for registering the app in univention-add-app
Use dedicated functions for registering the app in univention-add-app
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 3.2
Other Linux
: P5 enhancement (vote)
: UCS 3.2
Assigned To: Dirk Wiesenthal
Lukas Walter
: interim-2
Depends on: 31228
Blocks: 32308
  Show dependency treegraph
 
Reported: 2013-08-28 12:16 CEST by Dirk Wiesenthal
Modified: 2013-11-19 06:41 CET (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Usability
Max CVSS v3 score:


Attachments
Use application.register() (1.60 KB, patch)
2013-08-28 12:44 CEST, Dirk Wiesenthal
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2013-08-28 12:16:28 CEST
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
[...]
Comment 1 Dirk Wiesenthal univentionstaff 2013-08-28 12:18:02 CEST
Necessary because otherwise univention-add-app $UCS_COMPONENT will add some useless (if not harmful) UCR variables.
Comment 2 Dirk Wiesenthal univentionstaff 2013-08-28 12:44:14 CEST
Created attachment 5401 [details]
Use application.register()

Patch for univention-add-app
Comment 3 Dirk Wiesenthal univentionstaff 2013-08-28 12:45:14 CEST
Fixed in:
  univention-updater 9.0.13-1.1202.201308281243
Comment 4 Lukas Walter univentionstaff 2013-09-19 16:56:04 CEST
ok: code
ok: changelog 3.2
Comment 5 Stefan Gohmann univentionstaff 2013-11-19 06:41:20 CET
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".