* [PATCH] staging: Use hardlinking for sysroot_stage_dir
@ 2013-11-13 18:05 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2013-11-13 18:05 UTC (permalink / raw)
To: openembedded-core
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>
---
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index ddba0c9..94abcda 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_stripdir() {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-11-13 18:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-13 18:05 [PATCH] staging: Use hardlinking for sysroot_stage_dir Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox