From 8d69d74a5be6dac29fad2ab5d7206a0485969924 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Thu, 29 Jan 2015 20:30:31 +0000 Subject: [plugins] do not strip SYSROOT when copying link targets The abspath() call in _copy_symlink returns a host-relative path (when SYSROOT is not '/'). Pass this directly to _do_copy_path() without stripping the SYSROOT path component. Signed-off-by: Bryn M. Reeves --- sos/plugins/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index 7fa7ac6d..a7c0146b 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -265,7 +265,8 @@ class Plugin(object): # the target stored in the original symlink linkdest = os.readlink(srcpath) dest = os.path.join(os.path.dirname(srcpath), linkdest) - # absolute path to the link target + # Absolute path to the link target. If SYSROOT != '/' this path + # is relative to the host root file system. absdest = os.path.normpath(dest) # adjust the target used inside the report to always be relative if os.path.isabs(linkdest): -- cgit