dnf: update for DNF 4+ API

Correctly extract packages from transaction items:
 - old (pre DNF 4): iterate over item.installs()
 - new (DNF 4+): item.pkg

The old DNF is not supported anymore, so do not care about it.
This commit is contained in:
Marek Marczykowski-Górecki 2020-06-27 05:37:55 +02:00
parent 3f728df888
commit 587ac3b3a1
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -67,8 +67,7 @@ class QubesHooks(dnf.Plugin):
just_installed = self.base.transaction
# ...and filter them out of available updates
for item in just_installed:
for pkg in item.installs():
updates.discard(pkg)
updates.discard(item.pkg)
subprocess.call([
'/usr/lib/qubes/qrexec-client-vm',
'dom0',