From: Mariano Lopez <mariano.lo...@linux.intel.com> This new function is just a call to shutil.copy2() with follow_symlinks set to False. This function is needed when using shutil.copytree() to preserve the symlinks.
[YOCTO #9932] Signed-off-by: Mariano Lopez <mariano.lo...@linux.intel.com> --- meta/lib/oeqa/utils/commands.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 4f79d15..eedc4d7 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py @@ -18,6 +18,7 @@ from oeqa.utils import CommandError from oeqa.utils import ftools import re import contextlib +import shutil # Export test doesn't require bb try: import bb @@ -273,3 +274,11 @@ def updateEnv(env_file): for line in result.output.split("\0"): (key, _, value) = line.partition("=") os.environ[key] = value + +def oeqa_copy(src, dst): + """ + Copy files and symlinks trying to preserve metadata. + """ + + shutil.copy2(src, dst, follow_symlinks=False) + -- 2.6.6 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core