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
Upstream commit: 0b4b8cc
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 ppisar committed May 6, 2024
1 parent c09865a commit a60d698
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 @@ -375,8 +375,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 a60d698

Please sign in to comment.