!263 [sync] PR-261: dnf-automatic更新安全包和dnf tool更新行为不同
From: @openeuler-sync-bot Reviewed-by: @t_feng Signed-off-by: @t_feng
This commit is contained in:
commit
075c5f4247
@ -0,0 +1,39 @@
|
||||
From 5388d980c8137c3ee6924f145bd284169d838fad Mon Sep 17 00:00:00 2001
|
||||
From: Evan Goode <mail@evangoo.de>
|
||||
Date: Tue, 30 Jan 2024 21:36:46 +0000
|
||||
Subject: [PATCH] automatic: Use add_security_filters, not_update_security_filters
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream commit: 0b4b8cc8940a4073b33f1bb772651ae27e55f299
|
||||
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.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
|
||||
---
|
||||
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 f6f4049..caef627 100644
|
||||
--- a/dnf/automatic/main.py
|
||||
+++ b/dnf/automatic/main.py
|
||||
@@ -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()
|
||||
--
|
||||
2.43.0
|
||||
|
||||
10
dnf.spec
10
dnf.spec
@ -3,7 +3,7 @@
|
||||
|
||||
Name: dnf
|
||||
Version: 4.16.2
|
||||
Release: 7
|
||||
Release: 8
|
||||
Summary: A software package manager that manages packages on Linux distributions.
|
||||
License: GPL-2.0-or-later AND GPL-1.0-only
|
||||
URL: https://github.com/rpm-software-management/dnf
|
||||
@ -33,6 +33,8 @@ Patch6007: backport-doc-Remove-provide-of-spec-definition-for-repoque
|
||||
Patch6008: backport-Update-the-man-page-entry-for-the-countme-option.patch
|
||||
Patch6009: backport-Allow-local-downloads-to-same-downloaddir.patch
|
||||
|
||||
Patch9001: bugfix-automatic-Use-add_security_filters-not-_update_secur.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: cmake gettext systemd bash-completion python3-sphinx
|
||||
Requires: python3-%{name} = %{version}-%{release} libreport-filesystem
|
||||
@ -259,6 +261,12 @@ popd
|
||||
%{_mandir}/man8/%{name}-automatic.8*
|
||||
|
||||
%changelog
|
||||
* Mon Nov 04 2024 majianhan <majianhan@kylinos.cn> - 4.16.2-8
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: Fix dnf-automatic service to apply security updates the same way as dnf tool
|
||||
|
||||
* Mon Sep 9 2024 zhangzikang <zhangzikang@kylinos.cn> - 4.16.2-7
|
||||
- Allow local downloads to same downloaddir
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user