Change apt to dpkg for better performance #3004
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The purpose of this PR is to improve the speed of checking packages installed with
APT
.APT
has been changed todpkg
due to better performance.Speed tests
If we compare the execution results when checking the installed wazuh components we get the following data:
Check with APT
Check with dpkg
With this we check how the improvement when using dpkg is 93.23%
Install components tests
To check that the components are installed correctly when changing apt to dpkg, an AIO has been installed.
AIO installation
If we try to reinstall it, we can see that the components are already installed.
Try to reinstall wazuh components
It has also been tested to try uninstalling the components. Both when they are installed and when they do not exist:
Uninstalling wazuh components when they are installed
We see how to uninstall them correctly
Try to uninstall wazuh components when they are not installed
We can see how the installed packages are detected correctly.
Offline installation tests
In the offline installation section, check that the necessary packages are installed.
Offline installation packages installed