Poky Project Discussions
 help / color / mirror / Atom feed
* [PATCH 1/1] package.bbclass: Use hard link for package split instead of copy
  2010-12-02  0:50 [PATCH 0/1][PULL][RFC] package.bbclass: Use hard link for packages split instead of copy Dongxiao Xu
@ 2010-12-02  0:46 ` Dongxiao Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Dongxiao Xu @ 2010-12-02  0:46 UTC (permalink / raw)
  To: poky

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@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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 0/1][PULL][RFC] package.bbclass: Use hard link for packages split instead of copy
@ 2010-12-02  0:50 Dongxiao Xu
  2010-12-02  0:46 ` [PATCH 1/1] package.bbclass: Use hard link for package " Dongxiao Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Dongxiao Xu @ 2010-12-02  0:50 UTC (permalink / raw)
  To: poky

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

Pull URL: git://git.pokylinux.org/poky-contrib.git
  Branch: dxu4/perf
  Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dxu4/perf

Thanks,
    Dongxiao Xu <dongxiao.xu@intel.com>
---


Dongxiao Xu (1):
  package.bbclass: Use hard link for package split instead of copy

 meta/classes/package.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-12-02  0:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-02  0:50 [PATCH 0/1][PULL][RFC] package.bbclass: Use hard link for packages split instead of copy Dongxiao Xu
2010-12-02  0:46 ` [PATCH 1/1] package.bbclass: Use hard link for package " Dongxiao Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox