This weeks release of opsi-utils 126.96.36.199 consists mostly of internal changes. We sometimes do this to keep up with current developments but this time it is a little bit different. This change lead to shrinking the size of opsi-package-updater by a huge margin.
How did this come you might ask. Well, it all started a while ago when a customer got in contact through the support because he wanted to use some functionality from opsi-package-updater with his own script. Discussing the options it came clear that the best way to achieve this was to make sure that the functionality of opsi-package-updater becomes available for importing in another Python module. Luckily the customer was up for this route even though this would not be the fastest option but the one that provided the best long-term support for such an solution.
To achieve this we added the module
OPSI.Util.Task.UpdatePackages to python-opsi.
This now includes the majority of code that is
Besides becoming reusable we now also can provider proper unittests for the different components.
Working on the module I have split some components up to achieve looser coupling.
I'd like to refactor some internal workings of this in the future but right now my focus is on opsi supporting Python 3.
This brings us to the other changes that happend in opsi-utils. The small changes that have been made are to achieve better compatibility with Python 3. For most tools it will now be enough to change the shebang line to use Python 3 to work with python3-opsi. Some more work will have to be done there but we can already cross more things of our todo list.