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

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