From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx-3.enea.com (sestofw01.enea.se [192.36.1.252]) by mail.openembedded.org (Postfix) with SMTP id C71DD6BA7D for ; Tue, 3 Sep 2013 12:53:33 +0000 (UTC) Received: from localhost.enea.se (192.168.14.201) by smtp.enea.com (172.21.1.208) with Microsoft SMTP Server id 14.2.318.1; Tue, 3 Sep 2013 14:53:30 +0200 Message-ID: <5225DBC9.7040801@enea.com> Date: Tue, 3 Sep 2013 15:53:29 +0300 From: Vali Cobelea Organization: ENEA User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: Robert Yang References: <5225DB39.80204@windriver.com> In-Reply-To: <5225DB39.80204@windriver.com> X-Originating-IP: [192.168.14.201] Cc: openembedded-core@lists.openembedded.org Subject: Re: [PATCH 1/1] archiver.bbclass: exclude recursive symlink for diff X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Sep 2013 12:53:34 -0000 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit 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 >> Signed-off-by: Robert Yang >> --- >> 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