Blame SOURCES/0027-Don-t-include-resolved-advisories-for-obsoletes-with.patch

c115a0
From 66a37245e82c60b972ee35879f9c29c27466a27b Mon Sep 17 00:00:00 2001
c115a0
From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= <amatej@redhat.com>
c115a0
Date: Mon, 25 Jul 2022 12:44:17 +0200
c115a0
Subject: [PATCH] Don't include resolved advisories for obsoletes with sec.
c115a0
 filters (RhBug:2101421)
c115a0
c115a0
This makes the obsoletes security filters consistent with upgrade
c115a0
security filters.
c115a0
c115a0
This API is used from check-update and from Info and List commands.
c115a0
- For check-update we don't want to include resolved advisories to have
c115a0
  identical result to the actual update. That is bz2101421 use case.
c115a0
- For Info and List commands the --obsoletes switch: "List packages
c115a0
  installed on the system that are obsoleted by packages in any known
c115a0
  repository." Given this specification in makes sense not to
c115a0
  consider resolved advisories when we also use security filters.
c115a0
c115a0
There is still a general case when someone uses the API or any potential
c115a0
future use and I think it is best to have the behavior unified for
c115a0
"upgrades" and "obsoletes".
c115a0
c115a0
= changelog =
c115a0
msg:           Don't include resolved advisories for obsoletes filtering with security filters
c115a0
type:          bugfix
c115a0
resolves:      https://bugzilla.redhat.com/show_bug.cgi?id=2101421
c115a0
c115a0
Tests: https://github.com/rpm-software-management/ci-dnf-stack/pull/1134
c115a0
---
c115a0
 dnf/base.py | 2 +-
c115a0
 1 file changed, 1 insertion(+), 1 deletion(-)
c115a0
c115a0
diff --git a/dnf/base.py b/dnf/base.py
c115a0
index e606d9fa..e623d98e 100644
c115a0
--- a/dnf/base.py
c115a0
+++ b/dnf/base.py
c115a0
@@ -1565,7 +1565,7 @@ class Base(object):
c115a0
             obsoletes = query_for_repo(
c115a0
                 self.sack.query()).filter(obsoletes_by_priority=inst)
c115a0
             # reduce a query to security upgrades if they are specified
c115a0
-            obsoletes = self._merge_update_filters(obsoletes, warning=False)
c115a0
+            obsoletes = self._merge_update_filters(obsoletes, warning=False, upgrade=True)
c115a0
             obsoletesTuples = []
c115a0
             for new in obsoletes:
c115a0
                 obsoleted_reldeps = new.obsoletes
c115a0
-- 
c115a0
2.37.1
c115a0