fix(sos): add dnf5 support in dnf plugin#17074
Open
eric-desrochers wants to merge 1 commit intomicrosoft:tomls/base/mainfrom
Open
fix(sos): add dnf5 support in dnf plugin#17074eric-desrochers wants to merge 1 commit intomicrosoft:tomls/base/mainfrom
eric-desrochers wants to merge 1 commit intomicrosoft:tomls/base/mainfrom
Conversation
Handling DNF5 changes where legacy dnf commands produce Missing command or Unknown argument errors, while preserving existing dnf support unchanged. Signed-off-by: Eric Desrochers <eric.desrochers@microsoft.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the sos component to better tolerate DNF5 CLI changes by adding a downstream patch to the dnf sos plugin, and bumps the rendered spec release/changelog accordingly.
Changes:
- Add a new downstream patch introducing initial DNF5 handling in
sos/report/plugins/dnf.py. - Wire the patch into the
soscomponent overlays and the rendered spec (newPatch2), and bump the rpmautospec release/changelog. - Refresh the
sos.lockinput fingerprint to reflect the component definition change.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| specs/s/sos/sos.spec | Rendered spec updated to include the new patch and release/changelog bump. |
| specs/s/sos/dnf-initial-dnf5-support-in-dnf-plugin.patch | Rendered copy of the new DNF5 support patch. |
| locks/sos.lock | Updated input fingerprint for the modified component configuration. |
| base/comps/sos/sos.comp.toml | Adds a patch-add overlay to apply the new DNF5 support patch. |
| base/comps/sos/dnf-initial-dnf5-support-in-dnf-plugin.patch | Source-of-truth patch content applied via overlay during render/build. |
| tags='dnf_module_info') | ||
|
|
||
| def setup(self): | ||
| + has_dnf5 = self.is_installed('dnf5') |
Comment on lines
+41
to
+42
| self.add_cmd_output('dnf -C repolist', | ||
| tags=['yum_repolist', 'dnf_repolist']) |
| "/etc/pki/entitlement/*.pem" | ||
| ]) | ||
|
|
||
| + cmd = f"dnf history {'list' if self.is_installed('dnf5') else ''}" |
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.
Handling DNF5 changes where legacy dnf commands produce Missing command or Unknown argument errors.