diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-13 18:05:30 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-14 13:35:00 +0000 |
commit | 7136cbc64e5efb09f3fae3e2e35a181ca3d66dd4 (patch) | |
tree | f832fac01589d5308a33ed5670c568ff078a3835 /meta | |
parent | 616354f13732d13c17434d5b60b166f691c25761 (diff) | |
download | openembedded-core-7136cbc64e5efb09f3fae3e2e35a181ca3d66dd4.tar.gz openembedded-core-7136cbc64e5efb09f3fae3e2e35a181ca3d66dd4.tar.bz2 openembedded-core-7136cbc64e5efb09f3fae3e2e35a181ca3d66dd4.zip |
staging: Use hardlinking for sysroot_stage_dir
This saves about 2GB on a core-image-sato build so is worth doing and is
consistent with our efforts to try and decrease our build footprint.
Build time in my local test seemed unaffected but on more IO bound
machines it should help.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/staging.bbclass | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass index 814f7bc490..3985763f4b 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass @@ -7,14 +7,11 @@ sysroot_stage_dir() { return fi - # We only want to stage the contents of $src if it's non-empty so first rmdir $src - # then if it still exists (rmdir on non-empty dir fails) we can copy its contents - rmdir "$src" 2> /dev/null || true - # However we always want to stage a $src itself, even if it's empty mkdir -p "$dest" - if [ -d "$src" ]; then - tar -cf - -C "$src" -p . | tar -xf - -C "$dest" - fi + ( + cd $src + find . -print0 | cpio --null -pdlu $dest + ) } sysroot_stage_libdir() { |