Show the output of failed scriptlets to the user #1645
Closed
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.
Currently, the output of RPM scriptlets is kind of buried in the log. This patch introduces a new
script_output
callback, which is executed just beforescript_end
orscript_error
. While it would be more intuitive to include the scriptlet output directly as a new parameter inscript_end
andscript_error
, I opted to add a new callback to maintain compatibility.The scriptlet output is only printed in the event of a failure; it is not shown when the execution is successful.
Resolves: #522
Changes:
eaf5dd9 (Marek Blaha, 39 minutes ago)
dnf5: Handle script_output callback for transaction
0d6e2cf (Marek Blaha, 41 minutes ago)
transaction: New script_output callback
Used to pass the outputs (stdout and stderr) of an executed scriptlet to
the user.
b915955 (Marek Blaha, 26 hours ago)
transaction: Move scriptlet outputs to rpm::Transaction
The code works on rpm level anyway and I'd like to use this mechanism in
transaction callback to present the outputs to the user. Also adds
rpm::Transaction class member to store the output of the last scriptlet.