Skip to content

Commit

Permalink
automatic: Use add_security_filters, not _update_security_filters
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
evan-goode authored and kontura committed Feb 5, 2024
1 parent f8db3a6 commit 0b4b8cc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dnf/automatic/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 0b4b8cc

Please sign in to comment.