Product Updates
Some users have requested support for updates on different types of "items" such as: icon themes, applications, fonts, add-ons and others.
The ocs-store already stores a "version" attribute for each file but there is now way (at least not known to me) of relating a file with it's next version.
The file name could be used if no versioning is used on it, i.e.: appimage-cli-tool-1.9-x86_64.AppImage
will have to be renamed to appimage-cli-tool-x86_64.AppImage
and the file versioning will be shown in the "version" attribute. Yet the downloaded file must preserve the original name for debugging purposes.
This approach has the inconvenient that files cannot be renamed after they are uploaded and they will have to be uploaded without versioning information in its name. So users will not be able to rely on the file name to know the version of a downloaded product.
In resume, file names without version information altogether with the "version" attribute can be used to identify the right file to download when a new release of a given product is made. Yet it requires allowing renaming the files on the pling-store after they are uploaded.
Alternative solution: add an "update-id" attribute to relate files that represent successive releases of a given product. Client apps will search for the product files with the same "update-id" and select the one with the greatest "version". Once the file is identified they can proceed do the update.
The update process in the clients systems will vary depending on the type of product and the format. But basically it should contain the following steps:
- downloading the new file
- installing the file as usual
- uninstalling the old one, but keeping the file to allow rollbacks
In some scenarios (icons, wallpapers or themes) will be possible to perform and additional "apply" step as part of the update process.
The only modification required in the client side will be adding an "update lookup" method the already existent install/uninstall methods can be reused.