diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-08-04 11:18:05 +0000 |
---|---|---|
committer | Sam Thursfield <sam@afuera.me.uk> | 2014-09-05 13:00:21 +0000 |
commit | b08fe72ddf1b1ba8ba1779b7ef084b3dbf2d478a (patch) | |
tree | 682ba2942abf5b75c58e7479da886ea3b0459f86 | |
parent | a4da163c6b349cfc56b1c4a4c8cb25d85a445974 (diff) | |
download | morph-b08fe72ddf1b1ba8ba1779b7ef084b3dbf2d478a.tar.gz |
docker.write: Fix wrong symlink paths in the system tarball
This was causing an error when deploying systems that contained symlinks.
-rwxr-xr-x | morphlib/exts/docker.write | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/morphlib/exts/docker.write b/morphlib/exts/docker.write index bc9f9d0b..90ce3e69 100755 --- a/morphlib/exts/docker.write +++ b/morphlib/exts/docker.write @@ -302,7 +302,8 @@ class DockerWriteExtension(morphlib.writeexts.WriteExtension): tarinfo.name = os.path.relpath(old_name, fs_root) #print 'Tarinfo name %s, from path %s root %s' % (tarinfo.name, old_name, fs_root) if tarinfo.islnk(): - tarinfo.linkname = os.path.relpath(tarinfo.linkname, fs_root) + old_linkname = os.path.join('/', tarinfo.linkname) + tarinfo.linkname = os.path.relpath(old_linkname, fs_root) return tarinfo try: |