diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-08 15:19:05 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-12 10:14:10 +0000 |
commit | 8b90ed084d59b4e07aa547255d327b25cfb2ee2b (patch) | |
tree | 3ff4be7694e790ff58e7de3061cc268b054a8dcd /meta/lib | |
parent | f6e98af6b9f6729bb61f17e3b4203c3c79829205 (diff) | |
download | openembedded-core-8b90ed084d59b4e07aa547255d327b25cfb2ee2b.tar.gz openembedded-core-8b90ed084d59b4e07aa547255d327b25cfb2ee2b.tar.bz2 openembedded-core-8b90ed084d59b4e07aa547255d327b25cfb2ee2b.zip |
lib/oe/path: Fix performance issue got copyhardlinktree()
With the directory copy was added to avoid race issues, it wasn't noticed that
tar was recursing the directories and copying files too. This is completely
crazy when we hardlink those files in the next command.
Resolve the issue by telling tar not to recurse. This gives a significant
performance boost to various parts of the system (do_package for linux-yocto
256s -> 178s for example).
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/path.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py index 1310e38fe1..d0588baf15 100644 --- a/meta/lib/oe/path.py +++ b/meta/lib/oe/path.py @@ -93,7 +93,7 @@ def copyhardlinktree(src, dst): if (os.stat(src).st_dev == os.stat(dst).st_dev): # Need to copy directories only with tar first since cp will error if two # writers try and create a directory at the same time - cmd = 'cd %s; find . -type d -print | tar -cf - -C %s -p --files-from - | tar -xf - -C %s' % (src, src, dst) + cmd = 'cd %s; find . -type d -print | tar -cf - -C %s -p --files-from - --no-recursion | tar -xf - -C %s' % (src, src, dst) check_output(cmd, shell=True, stderr=subprocess.STDOUT) if os.path.isdir(src): src = src + "/*" |