SynoCommunity/spksrc — Issue #42: Upgrade framework
Author: Diaoul
Created: 2012-03-09 19:57:08+00:00
State: open
Labels: framework

The idea would be to create an upgrade framework.

Say you have rev 2 on your computer and rev 4 is out. Package Center will not do 2 -> 3 -> 4 but directly 2 -> 4. That might be a problem if rev 3 introduces some fundamental changes to the structure.

In installer.sh just add some functions :

* `migrate_1_to_2`
* `migrate_2_to_3`
* `migrate_3_to_4`

Add a little script in `preupdate` that will loop from the rev extracted from `SYNOPKG_OLD_PKGVER` and execute the appropriate functions in the right order.