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