aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/plugins/unpackaged.py1
-rw-r--r--sos/policies/redhat.py14
2 files changed, 14 insertions, 1 deletions
diff --git a/sos/plugins/unpackaged.py b/sos/plugins/unpackaged.py
index c24a22f7..bf015dad 100644
--- a/sos/plugins/unpackaged.py
+++ b/sos/plugins/unpackaged.py
@@ -70,6 +70,7 @@ class Unpackaged(Plugin, RedHatPlugin):
all_fsystem = []
all_frpm = set(self.policy.mangle_package_path(
self.policy.package_manager.files))
+
for d in get_env_path_list():
all_fsystem += all_files_system(d)
not_packaged = [x for x in all_fsystem if x not in all_frpm]
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
index 3d38be1b..f12cb847 100644
--- a/sos/policies/redhat.py
+++ b/sos/policies/redhat.py
@@ -122,8 +122,20 @@ class RedHatPolicy(LinuxPolicy):
:param files: the list of package managed files
"""
+ paths = []
+
+ def transform_path(path):
+ # Some packages actually own paths in /bin: in this case,
+ # duplicate the path as both the / and /usr version.
+ skip_paths = ["/bin/rpm", "/bin/mailx"]
+ if path in skip_paths:
+ return (path, os.path.join("/usr", path[1:]))
+ return (re.sub(r'(^)(/s?bin)', r'\1/usr\2', path),)
+
if self.usrmove:
- return [re.sub(r'(^)(/s?bin)', r'\1/usr\2', f) for f in files]
+ for f in files:
+ paths.extend(transform_path(f))
+ return paths
else:
return files