Support DNF5's config-manager#5657
Merged
marusak merged 1 commit intorhinstaller:masterfrom Aug 20, 2024
Merged
Conversation
Contributor
Author
|
Multilib test is not working ATM - see rhinstaller/kickstart-tests#1192 |
9033e4e to
673a27f
Compare
jkonecny12
requested changes
May 21, 2024
Member
jkonecny12
left a comment
There was a problem hiding this comment.
Please add the missing test and verify that the collect_requirements is correctly implemented. It seems to me that DNF payload might be solving this directly.
Otherwise looks great!
Comment on lines
+480
to
494
| def test_multilib_policy_dnf4(self, execute): | ||
| """Update the multilib policy on pre-dnf5 systems.""" | ||
| execute.return_value = 0 | ||
|
|
||
| with tempfile.TemporaryDirectory() as sysroot: | ||
| data = PackagesConfigurationData() | ||
| data.multilib_policy = MULTILIB_POLICY_ALL | ||
| dnf_manager = Mock(spec=DNFManager) | ||
| dnf_manager.is_package_available.return_value = False | ||
|
|
||
| task = UpdateDNFConfigurationTask(sysroot, data) | ||
| task = UpdateDNFConfigurationTask(sysroot, data, dnf_manager) | ||
| task.run() |
Member
There was a problem hiding this comment.
Would be great to check also if the required plugin package is correctly requested.
Comment on lines
+375
to
+393
| def collect_requirements(self): | ||
| """Return installation requirements for this module. | ||
|
|
||
| :return: a list of requirements | ||
| """ | ||
| requirements = [] | ||
|
|
||
| if self.dnf_manager.is_package_available("dnf5"): | ||
| plugins_name = "dnf5-modules" | ||
| else: | ||
| plugins_name = "dnf-plugins-core" | ||
|
|
||
| if self._packages_configuration.multilib_policy != MULTILIB_POLICY_BEST: | ||
| requirements.append( | ||
| Requirement.for_package(plugins_name, reason="Needed to enable multilib support.") | ||
| ) | ||
|
|
||
| return requirements | ||
|
|
Member
There was a problem hiding this comment.
This might not be the correct way at the end. I looked on the code and it seems that we should follow path:
|
This PR is stale because it has been open 60 days with no activity. |
673a27f to
b4bae77
Compare
b4bae77 to
a0903a7
Compare
a0903a7 to
6f39cb0
Compare
6f39cb0 to
5b27e24
Compare
Fedora rawhide is installing DNF5 on new systems. Payload that sets up multilib support on the system runs on the installed system, thus using DNF5. DNF5 changed config-manager plugin syntax. This commit makes sure that it works with both DNF4 as well as with DNF5.
5b27e24 to
a83757f
Compare
Member
|
/kickstart-test --testtype smoke |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fedora rawhide is installing DNF5 on new systems. Payload that sets up multilib support on the system runs on the installed system, thus using DNF5. DNF5 changed config-manager plugin syntax. This commit makes sure that it works with both DNF4 as well as with DNF5.