Bug 33537

Summary: Update barriers for apps
Product: UCS Reporter: Sönke Schwardt-Krummrich <schwardt>
Component: App CenterAssignee: Dirk Wiesenthal <wiesenthal>
Status: CLOSED FIXED QA Contact: Felix Botner <botner>
Severity: enhancement    
Priority: P2 CC: botner, gulden, wiesenthal
Version: UCS 4.1   
Target Milestone: UCS 4.1-2-errata   
Hardware: Other   
OS: Linux   
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:

Description Sönke Schwardt-Krummrich univentionstaff 2013-11-22 14:25:41 CET
Sometimes it is necessary for some apps to follow a strict update path.
Updating from version A → version B, then version B → version C.
It should be possible to define update barriers within the ini file to determine the "next" app version.

E.g. available versions: A, B, C, D, E, F(==lastest)
---[versionD.ini]---
UpdateBarrier=true
---

Should result in the following possible update steps:
A → D
B → D
C → D
D → F
E → F
Comment 1 Nico Gulden univentionstaff 2015-10-30 12:52:29 CET
See comment #5 at Ticket#2015102321000675 and comment #9 at Ticket#2015102321000577
Comment 2 Dirk Wiesenthal univentionstaff 2016-07-14 11:06:53 CEST
univention-appcenter 5.0.21-19.190.201607141025

ini:
ID=myapp
Version=3.0
RequiredAppVersionUpgrade=2.0

=>

myapp=1.0 will not be able to upgrade to myapp=3.0. The App Center shows that an upgrade is available, but only to myapp=2.0
Comment 3 Felix Botner univentionstaff 2016-07-19 16:04:12 CEST
local appcenter:
-> grep -i version horde*.ini
horde_20150804.ini:# application version
horde_20150804.ini:Version=5.2.7-1
horde_20160804.ini:# application version
horde_20160804.ini:Version=5.3.7-1
horde_20170804.ini:# application version
horde_20170804.ini:Version=5.4.7-1
horde_20170804.ini:RequiredAppVersionUpgrade=5.3.7-1

univention-app works, updates horde_20150804 to horde_20160804 then the second update updates horde_20160804 to horde_20170804

But UMC refuses the update. UMC shows

Installed version	5.2.7-1
Candidate version	5.3.7-1

this is OK (5.4.7-1 is not allowd if 5.2.7-1 is installed) but if i start the upgrade, i get 

"Horde Groupware Webmail Edition cannot be updated. The application is either not installed or no newer version is available."
Comment 4 Dirk Wiesenthal univentionstaff 2016-07-19 17:33:32 CEST
Improved fixes for legacy code in
  univention-appcenter 5.0.21-25.197.201607191724
Comment 5 Dirk Wiesenthal univentionstaff 2016-07-20 10:39:28 CEST
Also fixed univention-add-app in
  univention-updater 11.0.10-2.1479.201607201037
Comment 6 Dirk Wiesenthal univentionstaff 2016-07-20 10:42:33 CEST
(Requires a new YAML...)
  univention-updater.yaml
Comment 7 Felix Botner univentionstaff 2016-07-20 12:13:24 CEST
univention-updater:
 * OK - code
 * OK - univention-add-app
 * OK - YAML

univention-appcenter:

 setup: local appcenter:
 -> grep -i version horde*.ini
 horde_20150804.ini:# application version
 horde_20150804.ini:Version=5.2.7-1
 horde_20160804.ini:# application version
 horde_20160804.ini:Version=5.3.7-1
 horde_20170804.ini:# application version
 horde_20170804.ini:Version=5.4.7-1
 horde_20170804.ini:RequiredAppVersionUpgrade=5.3.7-1

 * OK - Upgrade with "RequiredAppVersionUpgrade=5.3.7-1" in horde_20170804.in
        from 5.2.7-1 to 5.4.7-1 only via 5.3.7-1
 * OK - Upgrade from 5.2.7-1 to 5.4.7-1 possible without 
        "RequiredAppVersionUpgrade" 
 * OK - tested with univention-app (docker) and UMC (legacy)
 * OK - YAML