diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2015-01-29 20:30:31 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2015-07-08 17:05:22 +0100 |
commit | 8d69d74a5be6dac29fad2ab5d7206a0485969924 (patch) | |
tree | 7a679476c8fd92ce877b0bb15937e05f07659b80 | |
parent | 6fe240a31c01d63957ce548f4415ca55859dc071 (diff) | |
download | sos-8d69d74a5be6dac29fad2ab5d7206a0485969924.tar.gz |
[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 <bmr@redhat.com>
-rw-r--r-- | sos/plugins/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
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): |