Blame SOURCES/0010-Honor-priority-with-check-update-RhBug1769466.patch

878112
From 505e534817d076c5190b211983a8a2c930cbe560 Mon Sep 17 00:00:00 2001
878112
From: Jaroslav Mracek <jmracek@redhat.com>
878112
Date: Mon, 16 Dec 2019 11:14:33 +0100
878112
Subject: [PATCH] Honor priority with check-update (RhBug:1769466)
878112
878112
Check update is going to use the new query filter that honors repo
878112
priority.
878112
878112
https://bugzilla.redhat.com/show_bug.cgi?id=1769466
878112
---
878112
 dnf.spec                     | 2 +-
878112
 dnf/base.py                  | 4 ++--
878112
 dnf/cli/commands/__init__.py | 2 +-
878112
 3 files changed, 4 insertions(+), 4 deletions(-)
878112
878112
diff --git a/dnf.spec b/dnf.spec
878112
index e20be1e241..57bfd778d4 100644
878112
--- a/dnf.spec
878112
+++ b/dnf.spec
878112
@@ -1,5 +1,5 @@
878112
 # default dependencies
878112
-%global hawkey_version 0.39.1
878112
+%global hawkey_version 0.41.0
878112
 %global libcomps_version 0.1.8
878112
 %global libmodulemd_version 1.4.0
878112
 %global rpm_version 4.14.0
878112
diff --git a/dnf/base.py b/dnf/base.py
878112
index c4ea04181a..1ed01c37a9 100644
878112
--- a/dnf/base.py
878112
+++ b/dnf/base.py
878112
@@ -1365,7 +1365,7 @@ def query_for_repo(query):
878112
 
878112
         # produce the updates list of tuples
878112
         elif pkgnarrow == 'upgrades':
878112
-            updates = query_for_repo(q).upgrades()
878112
+            updates = query_for_repo(q).filterm(upgrades_by_priority=True)
878112
             # reduce a query to security upgrades if they are specified
878112
             updates = self._merge_update_filters(updates)
878112
             # reduce a query to latest packages
878112
@@ -1417,7 +1417,7 @@ def query_for_repo(query):
878112
         elif pkgnarrow == 'obsoletes':
878112
             inst = q.installed()
878112
             obsoletes = query_for_repo(
878112
-                self.sack.query()).filter(obsoletes=inst)
878112
+                self.sack.query()).filter(obsoletes_by_priority=inst)
878112
             # reduce a query to security upgrades if they are specified
878112
             obsoletes = self._merge_update_filters(obsoletes, warning=False)
878112
             obsoletesTuples = []
878112
diff --git a/dnf/cli/commands/__init__.py b/dnf/cli/commands/__init__.py
878112
index 2a0726b654..d71a97f910 100644
878112
--- a/dnf/cli/commands/__init__.py
878112
+++ b/dnf/cli/commands/__init__.py
878112
@@ -279,7 +279,7 @@ def configure(self):
878112
         _checkEnabledRepo(self.base)
878112
 
878112
     def run(self):
878112
-        query = self.base.sack.query().upgrades()
878112
+        query = self.base.sack.query().filterm(upgrades_by_priority=True)
878112
         if self.base.conf.obsoletes:
878112
             obsoleted = query.union(self.base.sack.query().installed())
878112
             obsoletes = self.base.sack.query().filter(obsoletes=obsoleted)