Skip to content

Commit

Permalink
Don't close the multiprocessing queue too soon
Browse files Browse the repository at this point in the history
The transaction_stop is actually for RPMCALLBACK_TRANS_STOP from rpm,
which is only the end of preparation phase. The after_complete is called
by dnf after the whole transaction completes.

Also, the queue cannot be closed at this point, because transaction
errors are written there after the transaction completes and then
TransactionProgress.quit is called, which closes the queue as well.
  • Loading branch information
pkratoch committed Sep 24, 2024
1 parent 946ab77 commit 90ca8a4
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,9 @@ def script_start(self, item, nevra, type):
#libdnf5.rpm.to_full_nevra_string(nevra),
self._queue.put(('configure', nevra.get_name()))

def transaction_stop(self, total):
def after_complete(self, total):
log.debug("Done - %s", total)
self._queue.put(('done', None))
self._queue.close()

def cpio_error(self, item):
log.debug("Error - %s", item.get_package().to_string())
Expand Down

0 comments on commit 90ca8a4

Please sign in to comment.