From 0d7d346868caefee5c45d0961e7a62cf7ace4901 Mon Sep 17 00:00:00 2001 From: Evan Goode Date: Tue, 30 Jan 2024 21:36:46 +0000 Subject: [PATCH] automatic: Use add_security_filters, not _update_security_filters Resolves https://issues.redhat.com/browse/RHEL-21874 It seems that these two approaches for selecting security updates sometimes disagree. The regular `dnf update` command uses base.add_security_filters to select security updates, so dnf-automatic should do the same. --- dnf/automatic/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dnf/automatic/main.py b/dnf/automatic/main.py index c27a75268d..243e301580 100644 --- a/dnf/automatic/main.py +++ b/dnf/automatic/main.py @@ -380,8 +380,7 @@ def main(args): def upgrade(base, upgrade_type): if upgrade_type == 'security': - base._update_security_filters.append(base.sack.query().upgrades().filterm( - advisory_type='security')) + base.add_security_filters("gte", ("security",)) base.upgrade_all() elif upgrade_type == 'default': base.upgrade_all()