From: Robert Yang <liezhi.yang@windriver.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] oe/copy_buildsystem.py: dereference symlink
Date: Tue, 1 Nov 2016 18:18:13 +0800 [thread overview]
Message-ID: <fcb641d9-c4ae-bb72-cb96-98ec92e34797@windriver.com> (raw)
In-Reply-To: <1477994978.23123.46.camel@linuxfoundation.org>
On 11/01/2016 06:09 PM, Richard Purdie wrote:
> 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?
I should explain why not use oe.path.copytree(), but it was late last
night, so I forgot that. We can't use oe.path.copytree() since:
1) oe.path.copytree() doesn't dereference symlink
2) We need --exclude='.git'
I'd like to add two arguments to oe.path.copytree() to do this if it is worth.
// Robert
>
> Cheers,
>
> Richard
>
next prev parent reply other threads:[~2016-11-01 10:18 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
2016-11-01 10:18 ` Robert Yang [this message]
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=fcb641d9-c4ae-bb72-cb96-98ec92e34797@windriver.com \
--to=liezhi.yang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.