diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2016-10-31 08:48:58 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-11-06 23:35:16 +0000 |
commit | f4d70bb0882eec4fb46cd942f2796fad57c72982 (patch) | |
tree | 0ffd2b48143b49335c4cb3b052fa94f72fdac952 /meta/classes/spdx.bbclass | |
parent | 5199b990edf4d9784c19137d0ce9ef141cd85e46 (diff) | |
download | openembedded-core-f4d70bb0882eec4fb46cd942f2796fad57c72982.tar.gz openembedded-core-f4d70bb0882eec4fb46cd942f2796fad57c72982.tar.bz2 openembedded-core-f4d70bb0882eec4fb46cd942f2796fad57c72982.zip |
oe/copy_buildsystem.py: dereference symlink
When there is a relative symlink in the layer, for example:
symA -> ../out/of/layer/file
symA will be invalid fater copied, it would be invalid from build time
if it points to a relative path, and would be invalid after extracted
the sdk if it points to a absolute py. Dereference symlink when copy
will fix the problem.
Use tar rather than shutil.copytree() to copy is because:
1) shutil.copytree(symlinks=Fasle) has bugs when dereference symlinks:
https://bugs.python.org/issue21697
And Ubunutu 1404 doesn't upgrade python3 to fix the problem.
2) shutil.copytree(symlinks=False) raises errors when there is a invalid
symlink, and tar just prints a warning, tar is preferred here since
the real world is unpredicatable
3) tar is faster than shutil.copytree() as said by oe.path.copytree()
So use tar to copy.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes/spdx.bbclass')
0 files changed, 0 insertions, 0 deletions