|
|
1b0cb1 |
From aa1f12be109a2d997eeb1c1cce22beb09dd21d04 Mon Sep 17 00:00:00 2001
|
|
|
1b0cb1 |
From: Nicola Sella <nsella@redhat.com>
|
|
|
1b0cb1 |
Date: Thu, 11 Jun 2020 09:32:17 +0200
|
|
|
1b0cb1 |
Subject: [PATCH 1/2] [needs-restarting] Fix plugin fail if needs-restarting.d
|
|
|
1b0cb1 |
does not exist
|
|
|
1b0cb1 |
|
|
|
1b0cb1 |
includes pep8 warning fix and string formatting space missing
|
|
|
1b0cb1 |
---
|
|
|
1b0cb1 |
plugins/needs_restarting.py | 6 ++++--
|
|
|
1b0cb1 |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
1b0cb1 |
|
|
|
1b0cb1 |
diff --git a/plugins/needs_restarting.py b/plugins/needs_restarting.py
|
|
|
1b0cb1 |
index 91f7e116..6b7dacb6 100644
|
|
|
1b0cb1 |
--- a/plugins/needs_restarting.py
|
|
|
1b0cb1 |
+++ b/plugins/needs_restarting.py
|
|
|
1b0cb1 |
@@ -46,6 +46,8 @@ def get_options_from_dir(filepath, base):
|
|
|
1b0cb1 |
Return set of package names contained in files under filepath
|
|
|
1b0cb1 |
"""
|
|
|
1b0cb1 |
|
|
|
1b0cb1 |
+ if not os.path.exists(filepath):
|
|
|
1b0cb1 |
+ return set()
|
|
|
1b0cb1 |
options = set()
|
|
|
1b0cb1 |
for file in os.listdir(filepath):
|
|
|
1b0cb1 |
if os.path.isdir(file) or not file.endswith('.conf'):
|
|
|
1b0cb1 |
@@ -58,9 +60,9 @@ def get_options_from_dir(filepath, base):
|
|
|
1b0cb1 |
packages = set()
|
|
|
1b0cb1 |
for pkg in base.sack.query().installed().filter(name={x[0] for x in options}):
|
|
|
1b0cb1 |
packages.add(pkg.name)
|
|
|
1b0cb1 |
- for name, file in {x for x in options if x[0] not in packages }:
|
|
|
1b0cb1 |
+ for name, file in {x for x in options if x[0] not in packages}:
|
|
|
1b0cb1 |
logger.warning(
|
|
|
1b0cb1 |
- _('No installed package found for package name "{pkg}"'
|
|
|
1b0cb1 |
+ _('No installed package found for package name "{pkg}" '
|
|
|
1b0cb1 |
'specified in needs-restarting file "{file}".'.format(pkg=name, file=file)))
|
|
|
1b0cb1 |
return packages
|
|
|
1b0cb1 |
|
|
|
1b0cb1 |
|
|
|
1b0cb1 |
From 57955d299f751cb9927fe501fa086d9153092532 Mon Sep 17 00:00:00 2001
|
|
|
1b0cb1 |
From: Nicola Sella <nsella@redhat.com>
|
|
|
1b0cb1 |
Date: Thu, 11 Jun 2020 10:53:54 +0200
|
|
|
1b0cb1 |
Subject: [PATCH 2/2] [needs-restarting] add kernel-rt to reboot list
|
|
|
1b0cb1 |
|
|
|
1b0cb1 |
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1806060
|
|
|
1b0cb1 |
---
|
|
|
1b0cb1 |
plugins/needs_restarting.py | 4 ++--
|
|
|
1b0cb1 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
1b0cb1 |
|
|
|
1b0cb1 |
diff --git a/plugins/needs_restarting.py b/plugins/needs_restarting.py
|
|
|
1b0cb1 |
index 6b7dacb6..69203f4d 100644
|
|
|
1b0cb1 |
--- a/plugins/needs_restarting.py
|
|
|
1b0cb1 |
+++ b/plugins/needs_restarting.py
|
|
|
1b0cb1 |
@@ -37,8 +37,8 @@
|
|
|
1b0cb1 |
|
|
|
1b0cb1 |
# For which package updates we should recommend a reboot
|
|
|
1b0cb1 |
# Mostly taken from https://access.redhat.com/solutions/27943
|
|
|
1b0cb1 |
-NEED_REBOOT = ['kernel', 'glibc', 'linux-firmware', 'systemd', 'dbus',
|
|
|
1b0cb1 |
- 'dbus-broker', 'dbus-daemon']
|
|
|
1b0cb1 |
+NEED_REBOOT = ['kernel', 'kernel-rt', 'glibc', 'linux-firmware',
|
|
|
1b0cb1 |
+ 'systemd', 'dbus', 'dbus-broker', 'dbus-daemon']
|
|
|
1b0cb1 |
|
|
|
1b0cb1 |
def get_options_from_dir(filepath, base):
|
|
|
1b0cb1 |
"""
|