Blame SOURCES/0001-test-plugin-crash-if-needs-restarting-d-does-not-exist.patch

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