diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-03 17:34:54 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-06 13:11:19 +0000 |
commit | 8e373e69acac853213a62afb8bbdf0adc0c5045a (patch) | |
tree | fc15cfacd50fbf63167d308130c4629e8a04e8ac /meta/classes/sstate.bbclass | |
parent | ef45d35c1d534770f0e0e6d3e897d3f6062147a2 (diff) | |
download | openembedded-core-8e373e69acac853213a62afb8bbdf0adc0c5045a.tar.gz openembedded-core-8e373e69acac853213a62afb8bbdf0adc0c5045a.tar.bz2 openembedded-core-8e373e69acac853213a62afb8bbdf0adc0c5045a.zip |
sstate/path.py: Add copyhardlinktree() function and use for performance optimisation
Add a function which copys a tree as a set of hardlinks to the original
files, then use this in sstate to reduce some of the overhead of sstate
package creation since the file isn't actually copied.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r-- | meta/classes/sstate.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index a79d2b557e..6f77bb9013 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -458,14 +458,14 @@ def sstate_package(ss, d): dstpath = srcpath.replace(state[1], sstatebuild + state[0]) make_relative_symlink(srcpath, dstpath, d) bb.debug(2, "Preparing tree %s for packaging at %s" % (state[1], sstatebuild + state[0])) - oe.path.copytree(state[1], sstatebuild + state[0]) + oe.path.copyhardlinktree(state[1], sstatebuild + state[0]) workdir = d.getVar('WORKDIR', True) for plain in ss['plaindirs']: pdir = plain.replace(workdir, sstatebuild) bb.mkdirhier(plain) bb.mkdirhier(pdir) - oe.path.copytree(plain, pdir) + oe.path.copyhardlinktree(plain, pdir) d.setVar('SSTATE_BUILDDIR', sstatebuild) d.setVar('SSTATE_PKG', sstatepkg) |