From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Robert Yang <liezhi.yang@windriver.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] oe/copy_buildsystem.py: dereference symlink
Date: Tue, 01 Nov 2016 10:09:38 +0000 [thread overview]
Message-ID: <1477994978.23123.46.camel@linuxfoundation.org> (raw)
In-Reply-To: <bc402b553331b622af35b7fea7d30d82c7f2f686.1477928374.git.liezhi.yang@windriver.com>
On Mon, 2016-10-31 at 08:48 -0700, Robert Yang wrote:
> 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()
Could we just use oe.path.copytree() here?
Cheers,
Richard
next prev parent reply other threads:[~2016-11-01 10:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-31 15:48 [PATCH 0/1] oe/copy_buildsystem.py: dereference symlink Robert Yang
2016-10-31 15:48 ` [PATCH 1/1] " Robert Yang
2016-11-01 10:09 ` Richard Purdie [this message]
2016-11-01 10:18 ` Robert Yang
2016-11-01 12:15 ` Burton, Ross
2016-11-01 13:17 ` Robert Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1477994978.23123.46.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=liezhi.yang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox