sos/SOURCES/sos-bz1912821-sos-collector-declare-sysroot.patch
2021-10-08 16:52:09 +00:00

33 lines
1.0 KiB
Diff

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