summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/copy_buildsystem.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py
index afaff68598..29ac6d418f 100644
--- a/meta/lib/oe/copy_buildsystem.py
+++ b/meta/lib/oe/copy_buildsystem.py
@@ -4,11 +4,15 @@ import stat
4import shutil 4import shutil
5 5
6def _smart_copy(src, dest): 6def _smart_copy(src, dest):
7 import subprocess
7 # smart_copy will choose the correct function depending on whether the 8 # smart_copy will choose the correct function depending on whether the
8 # source is a file or a directory. 9 # source is a file or a directory.
9 mode = os.stat(src).st_mode 10 mode = os.stat(src).st_mode
10 if stat.S_ISDIR(mode): 11 if stat.S_ISDIR(mode):
11 shutil.copytree(src, dest, symlinks=True, ignore=shutil.ignore_patterns('.git')) 12 bb.utils.mkdirhier(dest)
13 cmd = "tar --exclude='.git' --xattrs --xattrs-include='*' -chf - -C %s -p . \
14 | tar --xattrs --xattrs-include='*' -xf - -C %s" % (src, dest)
15 subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
12 else: 16 else:
13 shutil.copyfile(src, dest) 17 shutil.copyfile(src, dest)
14 shutil.copymode(src, dest) 18 shutil.copymode(src, dest)