From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [58.251.152.64]) by mail.openembedded.org (Postfix) with ESMTP id 98DD76013D for ; Thu, 26 Mar 2015 12:59:01 +0000 (UTC) Received: from 172.24.2.119 (EHLO szxeml426-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CLI41556; Thu, 26 Mar 2015 20:58:46 +0800 (CST) Received: from [127.0.0.1] (10.111.55.101) by szxeml426-hub.china.huawei.com (10.82.67.181) with Microsoft SMTP Server id 14.3.158.1; Thu, 26 Mar 2015 20:58:06 +0800 Message-ID: <5514025A.4080004@huawei.com> Date: Thu, 26 Mar 2015 20:58:02 +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: Jack Mitchell 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> In-Reply-To: <5513F450.1010701@communistcode.co.uk> X-Originating-IP: [10.111.55.101] X-CFilter-Loop: Reflected Cc: "peifeiyue@huawei.com" , openembedded-core@lists.openembedded.org 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: Thu, 26 Mar 2015 12:59:04 -0000 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit On 2015/3/26 19:58, Jack Mitchell wrote: > > > On 26/03/15 11:31, Junling Zheng wrote: >> On 2015/3/26 17:54, Richard Purdie wrote: >>> On Thu, 2015-03-26 at 09:18 +0000, Junling Zheng wrote: >>>> The magic.h under the src/ directory should be generated by magic.h.in >>>> during compiling. However, if we modify the magic.h.in, we can find that >>>> sometimes the magic.h would not be generated again, and then we use the >>>> original one which is not correct. So remove the original magic.h. >>>> >>>> Signed-off-by: Junling Zheng >>>> --- >>>> meta/recipes-devtools/file/file_5.22.bb | 6 ++++++ >>>> 1 file changed, 6 insertions(+) >>>> >>>> diff --git a/meta/recipes-devtools/file/file_5.22.bb b/meta/recipes-devtools/file/file_5.22.bb >>>> index 9c6bb38..f4ee31b 100644 >>>> --- a/meta/recipes-devtools/file/file_5.22.bb >>>> +++ b/meta/recipes-devtools/file/file_5.22.bb >>>> @@ -22,6 +22,12 @@ inherit autotools >>>> FILES_${PN} += "${datadir}/misc/*.mgc" >>>> +do_configure_prepend() { >>>> + if test -f "${B}/src/magic.h"; then >>>> + rm -rf ${B}/src/magic.h >>>> + fi >>>> +} >>>> + >>> If the task checksums change, ${B} should get entirely wiped out with >>> recent releases of the build system (e.g. dizzy/fido/master). Which >>> version was this tested and found to be needed with? >>> >>> Cheers, >>> >>> Richard >>> >> This is tested in the Yocto 1.5 poky-dora-10.0.0, which uses the dora branch of oe-core. >> But I don't know which version it is actually in oe-core. And I think all branches in >> oe-core need this fix. >> >> Should ${B} be replaced by ${S}? Although sometimes they're not the same:) >> >> And I am puzzled why ${B} should be wiped out, and does it be replaced by any other variable >> except ${S}? >> >> Cheers, >> >> Junling >> > > Could this be related to my outstanding bug? There is definitely something odd going on around the file magic binary. > > https://bugzilla.yoctoproject.org/show_bug.cgi?id=7232 > Um, I don't think it is related to your bug... This problem is that sometimes the magic.h wouldn't be generated again by magic.h.in if there is already an original magic.h, and we may get an unexpected header file. Your bug looks like something is lack in your sysroots... Cheers, Junling