Block signals during RPM transaction processing #1984
Merged
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.
Prevent signals to interrupt the processing of the RPM transaction inside the DNF.
If the signal is received between the blockSignals calls, SQL DB is not properly closed then as this is normally handled later during the base cleanup. But the changes are present in the SQLite write-ahead log and when the DB is accessed next time, changes are propagated into the main file. We could move the unblocking statement further in the code, but I tried to keep the source code inside the blocking part in the minimum possible amount. The transaction summary logs still could be omitted, but maybe it is useful for debugging.
Note:
This was originally merged within the PR, but reverted soon as the provided API wasn't available on some RHEL and Fedora systems rebasing from upstream, which is not the case anymore.
Resolves https://issues.redhat.com/browse/RHEL-1235.