Bug 40754 - "univention-register-apps" != "univention-app update"
"univention-register-apps" != "univention-app update"
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.1-1-errata
Assigned To: Florian Best
Dirk Wiesenthal
Depends on:
  Show dependency treegraph
Reported: 2016-02-23 12:29 CET by Alexander Kläser
Modified: 2016-03-17 14:28 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):
Max CVSS v3 score:


Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2016-02-23 12:29:45 CET
I just observed that univention-register-apps behaves different from univention-app update:

Here the output of univention-app update:
---------- 8< ----------
root@ucs-1234:~# univention-app update
Downloading "https://appcenter.software-univention.de/meta-inf/4.1/index.json.gz"...                                                                                                                           
Downloading "https://appcenter.software-univention.de/meta-inf/4.1/index.json.gz.gpg"...                                                                                                                       
Downloading "https://appcenter.software-univention.de/meta-inf/categories.ini"...
Downloading "https://appcenter.software-univention.de/meta-inf/rating.ini"...
Deleting obsolete /var/cache/univention-appcenter/index.json.gz.gpg
Deleting obsolete /var/cache/univention-appcenter/index.json.gz
0 file(s) are new
File: /usr/share/univention-management-console/modules/apps.xml

File: /usr/share/univention-management-console/i18n/de/apps.mo
---------- 8< ----------

And here the output of univention-register-apps:
---------- 8< ----------
root@ucs-1234:~# /usr/sbin/univention-register-apps
23.02.16 11:48:31.329 MODULE      ( PROCESS ) : Downloading "https://appcenter.software-univention.de/meta-inf/4.1/index.json.gz.gpg"...
23.02.16 11:48:31.421 MODULE      ( PROCESS ) : Downloading "https://appcenter.software-univention.de/meta-inf/4.1/index.json.gz"...
23.02.16 11:48:31.614 MODULE      ( PROCESS ) : 0 file(s) are new
File: /usr/share/univention-management-console/modules/apps.xml
File: /usr/share/univention-management-console/i18n/de/apps.mo
File: /etc/apt/apt.conf.d/55user_agent
All applications have been registered.
---------- 8< ----------

There are mainly three places where univention-register-apps is used. I will adjust the call in univention-system-setup via Bug 40046.
---------- 8< ----------
$ git grep univention-register-apps
base/univention-system-setup/debian/univention-system-setup-boot.postinst:      /usr/sbin/univention-register-apps
base/univention-updater/script/univention-add-app:              subprocess.call(['/usr/sbin/univention-register-apps'])
---------- 8< ----------
Comment 1 Florian Best univentionstaff 2016-03-08 13:50:01 CET
"univention-register-apps" should use "univention-app update; univention-app register"
Comment 2 Dirk Wiesenthal univentionstaff 2016-03-08 14:27:27 CET
univention-register-apps uses the old code.

Downloading index.json.gz from the old code may result in an outdated cache. Furthermore, the old code considers Apps without DefaultPackages as installed, always.

This is a problem with Docker Apps that have their software already installed in the container, e.g., jenkins.

Please adjust univention-register-apps to use the new code. Add a deprecation warning to the output.
Comment 3 Alexander Kläser univentionstaff 2016-03-09 11:07:43 CET
This has already been fixed with r67632 while working on Bug 40046.
Comment 4 Alexander Kläser univentionstaff 2016-03-09 11:08:27 CET
BTW, the fix can be found in ucs-4.1/component/app-appliance/univention-system-setup
Comment 5 Florian Best univentionstaff 2016-03-09 11:10:03 CET
It has only been fixed in system-setup but not in general.
Comment 6 Florian Best univentionstaff 2016-03-11 06:54:47 CET
univention-appcenter (5.0.20-21):
r68035 | Bug #40754: use the new python code in univention-register-apps

r68036 | YAML Bug #40754 Bug #40875
Comment 7 Dirk Wiesenthal univentionstaff 2016-03-15 22:32:17 CET
Code: OK
Comment 8 Philipp Hahn univentionstaff 2016-03-17 14:28:54 CET