From 587ac3b3a11b986f8cdd986e3d5aad058917992b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 27 Jun 2020 05:37:55 +0200 Subject: [PATCH] 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. --- package-managers/dnf-qubes-hooks.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package-managers/dnf-qubes-hooks.py b/package-managers/dnf-qubes-hooks.py index 7da6c73..473553d 100644 --- a/package-managers/dnf-qubes-hooks.py +++ b/package-managers/dnf-qubes-hooks.py @@ -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',