diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-10-09 09:59:39 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-10-09 13:12:39 +0000 |
commit | f0efec459795929f2d9bc79b52c77c63908f5ab0 (patch) | |
tree | 08bfdc9097fe950136c10710638bfec329cb11fe /morphlib/plugins | |
parent | caa574e146ebd09555b717b8aa456fdde0a0d32a (diff) | |
download | morph-f0efec459795929f2d9bc79b52c77c63908f5ab0.tar.gz |
Make hardlink paths relative
Symlink paths are not altered, since their paths are relative to
where the link is, not the root of the file system, and should be
handled by the chunk's creation.
Diffstat (limited to 'morphlib/plugins')
-rw-r--r-- | morphlib/plugins/tarball-systembuilder_plugin.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/morphlib/plugins/tarball-systembuilder_plugin.py b/morphlib/plugins/tarball-systembuilder_plugin.py index ca218ac0..95cae4cd 100644 --- a/morphlib/plugins/tarball-systembuilder_plugin.py +++ b/morphlib/plugins/tarball-systembuilder_plugin.py @@ -54,6 +54,9 @@ class RootfsTarballBuilder(SystemKindBuilder): # pragma: no cover unslashy_root = fs_root[1:] def uproot_info(info): info.name = relpath(info.name, unslashy_root) + if info.islnk(): + info.linkname = relpath(info.linkname, + unslashy_root) return info artiname = self.artifact.source.morphology['name'] tar = tarfile.TarFile.gzopen(fileobj=handle, mode="w", |