sos/sos-bz782589-fix-symlink-target-collection.patch
Bryn M. Reeves 13178ca5fa Update sos to 2.2-29
This synchronises sos in master to the current upstream sos-2.2 branch and
includes all patches from RHEL6 not already present.
2012-06-22 12:16:21 +01:00

15 lines
712 B
Diff

diff -up sos-2.2/sos/plugintools.py.orig sos-2.2/sos/plugintools.py
--- sos-2.2/sos/plugintools.py.orig 2012-03-06 11:21:31.658321690 +0000
+++ sos-2.2/sos/plugintools.py 2012-03-06 11:21:35.126321769 +0000
@@ -176,6 +176,10 @@ class PluginBase:
except OSError:
# self.soslog.debug("skipping symlink creation: already exists (%s)" % dstslname)
return
+ if os.path.isabs(link):
+ self.doCopyFileOrDir(link)
+ else:
+ self.doCopyFileOrDir(os.path.join(os.path.dirname(srcpath), link))
self.copiedFiles.append({'srcpath':srcpath, 'dstpath':rpth, 'symlink':"yes", 'pointsto':link})
return