Browse Source

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.
Marek Marczykowski-Górecki 3 years ago
parent
commit
587ac3b3a1
1 changed files with 1 additions and 2 deletions
  1. 1 2
      package-managers/dnf-qubes-hooks.py

+ 1 - 2
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',