Blame SOURCES/sos-bz1912821-sos-collector-declare-sysroot.patch

8bcace
From debb61f8137c53bdaf8d4473756c68c5e4d5cca2 Mon Sep 17 00:00:00 2001
8bcace
From: Pavel Moravec <pmoravec@redhat.com>
8bcace
Date: Tue, 5 Jan 2021 13:35:34 +0100
8bcace
Subject: [PATCH] [collector] declare sysroot for each component
8bcace
8bcace
Commit 7f72a36 requires self.sysroot to exist for each component,
8bcace
but it is not set for sos-collector. Let pre-fill self.sysroot
8bcace
every time.
8bcace
8bcace
Resolves: #2358
8bcace
8bcace
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
8bcace
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
8bcace
---
8bcace
 sos/component.py | 1 +
8bcace
 1 file changed, 1 insertion(+)
8bcace
8bcace
diff --git a/sos/component.py b/sos/component.py
8bcace
index bd008761..223c3812 100644
8bcace
--- a/sos/component.py
8bcace
+++ b/sos/component.py
8bcace
@@ -108,6 +108,7 @@ class SoSComponent():
8bcace
             try:
8bcace
                 import sos.policies
8bcace
                 self.policy = sos.policies.load(sysroot=self.opts.sysroot)
8bcace
+                self.sysroot = self.policy.host_sysroot()
8bcace
             except KeyboardInterrupt:
8bcace
                 self._exit(0)
8bcace
             self._is_root = self.policy.is_root()
8bcace
-- 
8bcace
2.26.2
8bcace