Docs: Update template code, documentation page for the DNF5 Command Template #1994
+79
−28
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.
Recently on Fedora Discussions, it was brought up / discovered that the template source code in the DNF5 documentation had fallen a bit out of date, to the point where it wasn't even compilable because the internal APIs have changed so much in two years.
Since it actually says, right at the top of that page:
...It seemed clear that it was no longer remotely achieving that goal.
So, I went through and updated all of the included source code based on the current
dnf5/commands/
source anddnf5/main.cpp
, built and tested the template source integrated into DNF5 (as a newdnf5/commands/template/
directory, just like the note says), and also updated the sample output at the end to reflect reality.I hope to do the same for the other two template documents, as well, but we'll see what happens. I wanted to at least submit this one for now, and I'll take the rest one step at a time.