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.
The first commit only adds an existing argument (
res
) into the D-Bus message - I suppose it had been intended to provide a transaction result as well.The second commit adds also information about the changes, like the operation and the NEVRA of the transaction packages. This implementation can have one downside, with many packages the D-Bus message will be large. I can add some limit, like up to 100 packages or so, and pass an empty array in such case. Using file descriptors feels like an overhead for this information.
My intention is to use the details about the transaction in the gnome-software, to update its GUI only if any of the touched packages corresponds to an application covered by the app itself. While it's relatively easy to get to the list of the installed packages, the removals are not recorded, those transactions are lost immediately (I guess, when a transaction does both install and remove, then only install is recorded anyway). This can have a significant performance benefit for the gnome-software, because currently it can only tell the app to "reload everything", which is a lot of work for the CPU & co..