This article will walk through the basic steps that can be used to check for code collisions between a new fix pack or hotfix and custom plugins.
NOTE: This procedure requires that the patches being installed include the source code. This option is available for Patching Tool v. 19 - v. 22. Starting with Patching Tool 3.0.20 and Liferay DXP 7.3, source code is only available in the Liferay DXP GitHub repository (more information: DXP Source Code Access)
Affected Products
Patching Tool v. 19 - v. 22
Resolution
In this example, we will be checking the Portal-64 hotfix for collisions against the previously installed Portal-45 hotfix.
- Stop the server running the portal.
- Run
./patching-tool.sh store
to check the current patch level. If no store is found, it can be added by running./patching-tool.sh store add {label}. Replace {label}
with an appropriate label for the current patch level such as "Portal-45". - Place the Portal-64 FixPack in the patching-tool/patches directory.
- Verify that Portal-64 is ready to be installed by running
./patching-tool.sh info
.NOTE: If a warning occurs that shows a loss in fixes with this new patch level, please, contact the Support Team by opening a new Help Center ticket.
- Without installing the new patch, add it to the store by running
./patching-tool.sh store add {new-label}
. This will allow us to check for collisions against the old patch level. - To list the differences between the last patch level and the new one, run
./patching-tool.sh diff files collisions {label}
. Be sure to replace{label}
with the first label used in step 2. - To locate the plugins that contain the files listed in step 6, run
./patching-tool.sh list-collisions
. - Run
./patching-tool.sh diff source collisions {label}
to view the differences in the code between the files used in the custom plugins that will be modified by the new patch.NOTE: If any Liferay plugins are listed as having collisions, please open a new Help Center ticket with the Support Team.
- After updating the custom plugins to work with the new code, install the new patch by running
./patching-tool.sh install
. - The currently installed plugin libraries can be updated by running
./patching-tool.sh update-plugins
. - Start the portal server.
- Deploy the new versions of the custom plugins.
- Test the custom plugins to ensure no issue occur.