Split package manager code into scripts and execution #3587
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.
Current package manager classes were given a guest, and then were responsible for running commands on the guest to install stuff. To support delayed running of these commands - I'm looking at you, image mode! - we would like to use the existing implementations, use the existing code preparing commands like
dnf install foo
, we just don't want to run them on the guest.Package manager classes are now split into two parts: "engine" that is pretty much what package managers are now, i.e. prepares commands that would reaize the requested action, and the "package manager" whose job is to urn these commands. Each package manager has its own engine. The effect is, we can now can access an engine we pick, and use it to construct the commands without actually running them. We can put them into Containerfiles, or run them in a special SSH session, and so on. And it will use the same code as the usual "install me a package now" workflow of regular testing, preventing duplication and exceptions.
Pull Request Checklist