diff options
author | 2014-12-06 15:48:27 -0100 | |
---|---|---|
committer | 2014-12-06 15:48:27 -0100 | |
commit | 2fea87234ffc48c3dd96f1204b27f667f5ade3a3 (patch) | |
tree | 577ec52b5f126fed5719c0130fcb3073ce330a30 | |
parent | Fix name of system.map for sparc (diff) | |
download | catalyst-2fea87234ffc48c3dd96f1204b27f667f5ade3a3.tar.gz catalyst-2fea87234ffc48c3dd96f1204b27f667f5ade3a3.tar.bz2 catalyst-2fea87234ffc48c3dd96f1204b27f667f5ade3a3.zip |
Add --xattrs and --acls to the tar calls so we don't lose file properties while building the stages - should fix bug 531788.
Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org>
-rw-r--r-- | modules/catalyst_support.py | 6 | ||||
-rw-r--r-- | modules/generic_stage_target.py | 18 |
2 files changed, 12 insertions, 12 deletions
diff --git a/modules/catalyst_support.py b/modules/catalyst_support.py index 8112ed0b..0e9faac7 100644 --- a/modules/catalyst_support.py +++ b/modules/catalyst_support.py @@ -108,9 +108,9 @@ contents_map={ # 'find' is disabled because it requires the source path, which is not # always available #"find" :[calc_contents,"find %(path)s"], - "tar-tv":[calc_contents,"tar tvf %(file)s"], - "tar-tvz":[calc_contents,"tar tvzf %(file)s"], - "tar-tvj":[calc_contents,"tar -I lbzip2 -tvf %(file)s"], + "tar-tv":[calc_contents,"tar --xattrs --acls tvf %(file)s"], + "tar-tvz":[calc_contents,"tar --xattrs --acls tvzf %(file)s"], + "tar-tvj":[calc_contents,"tar --xattrs --acls -I lbzip2 -tvf %(file)s"], "isoinfo-l":[calc_contents,"isoinfo -l -i %(file)s"], # isoinfo-f should be a last resort only "isoinfo-f":[calc_contents,"isoinfo -f -i %(file)s"], diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index 6852b7ed..62f532b4 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -660,10 +660,10 @@ class generic_stage_target(generic_target): self.settings["chroot_path"]+\ " (This may take some time) ...\n" if "bz2" == self.settings["chroot_path"][-3:]: - unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\ + unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\ self.settings["chroot_path"] else: - unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\ + unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\ self.settings["chroot_path"] error_msg="Tarball extraction of "+\ self.settings["source_path"]+" to "+\ @@ -675,10 +675,10 @@ class generic_stage_target(generic_target): self.settings["chroot_path"]+\ " (This may take some time) ...\n" if "bz2" == self.settings["chroot_path"][-3:]: - unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\ + unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\ self.settings["chroot_path"] else: - unpack_cmd="tar -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\ + unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["source_path"]+" -C "+\ self.settings["chroot_path"] error_msg="Tarball extraction of "+self.settings["source_path"]+\ " to "+self.settings["chroot_path"]+" failed." @@ -777,9 +777,9 @@ class generic_stage_target(generic_target): "catalyst-hash") destdir=self.settings["snapshot_cache_path"] if "bz2" == self.settings["chroot_path"][-3:]: - unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir + unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+destdir else: - unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+destdir + unpack_cmd="tar --xattrs --acls xpf "+self.settings["snapshot_path"]+" -C "+destdir unpack_errmsg="Error unpacking snapshot" cleanup_msg="Cleaning up invalid snapshot cache at \n\t"+\ self.settings["snapshot_cache_path"]+\ @@ -796,10 +796,10 @@ class generic_stage_target(generic_target): cleanup_msg=\ "Cleaning up existing portage tree (This can take a long time)..." if "bz2" == self.settings["chroot_path"][-3:]: - unpack_cmd="tar -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\ + unpack_cmd="tar --xattrs --acls -I lbzip2 -xpf "+self.settings["snapshot_path"]+" -C "+\ self.settings["chroot_path"]+"/usr" else: - unpack_cmd="tar xpf "+self.settings["snapshot_path"]+" -C "+\ + unpack_cmd="tar --xattrs --acls xpf "+self.settings["snapshot_path"]+" -C "+\ self.settings["chroot_path"]+"/usr" unpack_errmsg="Error unpacking snapshot" @@ -1224,7 +1224,7 @@ class generic_stage_target(generic_target): print "Creating stage tarball..." - cmd("tar -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\ + cmd("tar --xattrs --acls -I lbzip2 -cpf "+self.settings["target_path"]+" -C "+\ self.settings["stage_path"]+" .",\ "Couldn't create stage tarball",env=self.env) |