AXP Blogs

« Back

Using Patches with AXP

The AXP upgrade process provides key features such as automatic deletion of previously installed files that are not included in the upgrade package. However, in order to not delete previously installed files, the upgrade process requires that previously installed files be included in the upgrade package which can lead to bloated packages. To simply the package and reduce package size, users can create a patch to modify only intended files. For example, if the initial installed package contained File-A, File-B and File-C, and the desire is to modify just File-C, then only the modified File-C would be included in the patch. Bear in mind that similar to upgrading, modified files must have the same directory location and name as the previously installed file that is to be modified.

The patch process is fairly simple. A package is created with only the files that are to be added or intended to replace existing files. This small package must be set as dependent upon the installed package it is intended to modify. For example, if the assigned uuid of the installed package is: cc1694d0-0323-403a-9ae9-77686086529e, then the packaging script of the intended patch should contain the parameter and value '--deps cc1694d0-0323-403a-9ae9-77686086529e, all'.
This established dependency forces the soon-to-be installed patch to modify only the intended package specified via the 'deps' parameter. Once the patch has been packaged it is then installed via the AXP cli 'software install package url ...'.

As the reader can see the advantage of using patches is that much smaller packages can be created and installed with just the desired files. An installed application can be patched as many times as desired, and patches can even be upgraded, though the upgrade rules would still apply.

There are some limitations of patches. Since automatic deletion is not supported, deletion of files should be managed via the post installation script. Finally, there is no version control of patches, which means that if a patch is uninstalled the added and modified files are fully removed.
Comments