From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [119.145.14.66]) by mail.openembedded.org (Postfix) with ESMTP id 7EB2B724B9 for ; Mon, 30 Mar 2015 01:50:08 +0000 (UTC) Received: from 172.24.2.119 (EHLO szxeml434-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BDU03780; Mon, 30 Mar 2015 09:50:06 +0800 (CST) Received: from [127.0.0.1] (10.111.55.101) by szxeml434-hub.china.huawei.com (10.82.67.225) with Microsoft SMTP Server id 14.3.158.1; Mon, 30 Mar 2015 09:49:55 +0800 Message-ID: <5518ABC0.7040008@huawei.com> Date: Mon, 30 Mar 2015 09:49:52 +0800 From: Junling Zheng User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Richard Purdie References: <1427361482-5775-1-git-send-email-zhengjunling@huawei.com> <1427363666.14020.62.camel@linuxfoundation.org> <5513EE0B.5070802@huawei.com> <5513F450.1010701@communistcode.co.uk> <5514025A.4080004@huawei.com> <5514CF16.2020804@huawei.com> <551613A2.10506@huawei.com> <1427532804.14020.220.camel@linuxfoundation.org> <5516764F.8050805@huawei.com> <1427540746.14020.224.camel@linuxfoundation.org> In-Reply-To: <1427540746.14020.224.camel@linuxfoundation.org> X-Originating-IP: [10.111.55.101] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.5518ABCF.0017, ss=1, re=0.001, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 0222b2e4f8b425cb54e4eda50c4a8daf Cc: "peifeiyue@huawei.com" , OE-core Subject: Re: [PATCH] file: remove the original magic.h 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: Mon, 30 Mar 2015 01:50:12 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On 2015/3/28 19:05, Richard Purdie wrote: > On Sat, 2015-03-28 at 17:37 +0800, Junling Zheng wrote: >> On 2015/3/28 16:53, Richard Purdie wrote: >>> On Sat, 2015-03-28 at 10:36 +0800, Junling Zheng wrote: >>> We ran into this problem in our branches. You need to ensure that your >>> CVE patches just touch magic.h.in and *not* magic.h. If you do that, the >>> timestamp of magic.h.in will be more recent that magic.h and your build >>> will function correctly. >>> >>> The problem is that patch can patch those two files "at the same time" >>> on fast machines. You should never patch generated filed in patches in >>> OE in general. >>> >>> Cheers, >>> >>> Richard >>> >> Hi, Richard >> >> You're right. My CVE patches indeed touch the original magic.h, and that's also why this problem reproduces probabilistic. >> >> I remove the modifying of magic.h in my patches, and this problem seems to be fixed. >> >> However, I still think the origin magic.h is confusing and redundant...:) > > There is actually more to this. magic.h is listed as a BUILT_SOURCES > file which means it is not regenerated by the usual dependency magic and > timestamps, only if it doesn't exist or you run make all/check/install. > > http://www.gnu.org/software/automake/manual/html_node/Sources.html > > So you do need it in your patch however you need to ensure your patch > generates a magic.h which matches magic.h.in. > > Cheers, > > Richard > I get it! Thanks a lot for your detailed explanation:) Cheers, Junling