[poky] [PATCH 1/1] package.bbclass: Use hard link for package split instead of copy

Dongxiao Xu dongxiao.xu at intel.com
Wed Dec 1 16:46:27 PST 2010


When doing package split, we use hard link instead of copy, which can
save about 10% disk space when building poky-image-minimal.

Signed-off-by: Dongxiao Xu <dongxiao.xu at intel.com>
---
 meta/classes/package.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index d39c694..2940eb9 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -406,8 +406,8 @@ python populate_packages () {
 			fpath = os.path.join(root,file)
 			dpath = os.path.dirname(fpath)
 			bb.mkdirhier(dpath)
-			ret = bb.copyfile(file, fpath)
-			if ret is False or ret == 0:
+			ret = os.system("ln %s %s" % (file, fpath))
+			if ret is False:
 				raise bb.build.FuncFailed("File population failed")
 		del localdata
 	os.chdir(workdir)
-- 
1.6.3.3




More information about the poky mailing list