summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-13 18:05:30 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-14 13:39:47 +0000
commit931cf6e9a8296597a06ec406e162121b794de3bf (patch)
treed2d549bef9e2cbf70e97263e7712f6b45ece11a0
parentea92671d9823e3667d6ced7ac2af20f991da404d (diff)
downloadpoky-931cf6e9a8296597a06ec406e162121b794de3bf.tar.gz
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. (From OE-Core rev: 7136cbc64e5efb09f3fae3e2e35a181ca3d66dd4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/staging.bbclass11
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() {
7 return 7 return
8 fi 8 fi
9 9
10 # We only want to stage the contents of $src if it's non-empty so first rmdir $src
11 # then if it still exists (rmdir on non-empty dir fails) we can copy its contents
12 rmdir "$src" 2> /dev/null || true
13 # However we always want to stage a $src itself, even if it's empty
14 mkdir -p "$dest" 10 mkdir -p "$dest"
15 if [ -d "$src" ]; then 11 (
16 tar -cf - -C "$src" -p . | tar -xf - -C "$dest" 12 cd $src
17 fi 13 find . -print0 | cpio --null -pdlu $dest
14 )
18} 15}
19 16
20sysroot_stage_libdir() { 17sysroot_stage_libdir() {