Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: Vali Cobelea <valentin.cobelea@enea.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] archiver.bbclass: exclude recursive symlink for diff
Date: Wed, 4 Sep 2013 08:57:20 +0800	[thread overview]
Message-ID: <52268570.7050701@windriver.com> (raw)
In-Reply-To: <5225DBC9.7040801@enea.com>


Hi Valentin,

It hangs up when build acl (which means that I can reproduce the
problem as you have told), but it worked well without this patch,
maybe python version related, I will do more investigation.

// Robert

On 09/03/2013 08:53 PM, Vali Cobelea wrote:
> Hi,
>
> What seems to be the issue ?
>
> BR,
> Valentin
>
>
> On 09/03/2013 03:51 PM, Robert Yang wrote:
>>
>> Please hold this patch for a while, seems that it didn't fix all of the things.
>>
>> // Robert
>>
>> On 09/03/2013 07:51 PM, Robert Yang wrote:
>>> There would be errors if there are recursive symlinks in the ${S}:
>>>
>>> diff:
>>> /xxx/udev/182-r8/udev-182/test/sys/block/loop0/bdi/subsystem/0:16/subsystem:
>>> recursive directory loop
>>>
>>> We can check the recursive symlink and save it to the exclude file, then
>>> the diff's --exclude-from argument can exclude them
>>>
>>> [YOCTO #4986]
>>>
>>> Signed-off-by: Valentin Cobelea <valentin.cobelea@enea.com>
>>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>>> ---
>>>   meta/classes/archiver.bbclass |   18 ++++++++++++++++++
>>>   1 file changed, 18 insertions(+)
>>>
>>> diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
>>> index 66efe7d..f5ad562 100644
>>> --- a/meta/classes/archiver.bbclass
>>> +++ b/meta/classes/archiver.bbclass
>>> @@ -493,6 +493,24 @@ def create_diff_gz(d):
>>>       for i in exclude_from:
>>>           f.write(i)
>>>           f.write("\n")
>>> +
>>> +    symlinks = []
>>> +    directories = []
>>> +
>>> +    # Add symlink and root dir to the separated lists for checking whether
>>> +    # there is recursive symlink
>>> +    for root, dirs, files in os.walk(os.getcwd(), followlinks=True):
>>> +        if os.path.islink(root):
>>> +            symlinks.append(root)
>>> +        elif os.path.isdir(root):
>>> +            directories.append(root)
>>> +
>>> +    # Check if there is a recursive symlink to a dir
>>> +    for sym in symlinks:
>>> +        if sym in directories:
>>> +            # write the 'sym' in the 'exclude-from' file
>>> +            f.write(os.path.basename(sym))
>>> +
>>>       f.close()
>>>
>>>       s=d.getVar('S', True)
>>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>


  reply	other threads:[~2013-09-04  0:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03 11:51 [PATCH 0/1] archiver.bbclass: exclude recursive symlink for diff Robert Yang
2013-09-03 11:51 ` [PATCH 1/1] " Robert Yang
2013-09-03 12:51   ` Robert Yang
2013-09-03 12:53     ` Vali Cobelea
2013-09-04  0:57       ` Robert Yang [this message]
2013-09-04  7:22         ` Vali Cobelea
2013-09-04  8:01           ` 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=52268570.7050701@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=valentin.cobelea@enea.com \
    /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