[OE-core] [PATCH 1/1] sstate.bbclass: fix parallel building issue
Rongqing Li
rongqing.li at windriver.com
Wed Aug 14 05:28:53 UTC 2013
On 08/14/2013 03:02 AM, Saul Wold wrote:
> On 08/13/2013 01:20 AM, rongqing.li at windriver.com wrote:
>> From: "Roy.Li" <rongqing.li at windriver.com>
>>
>> sstate_package creates hardlink from sysroot to SSTATE_BUILDDIR, then
>> sstate_create_package will store SSTATE_BUILDDIR into a archive file by
>> tar, but once other packages install the same file into sysroot, the
>> creating the archive file will fail with below error:
>>
>> DEBUG: Executing shell function sstate_create_package
>> tar: x86_64-linux/usr/share/aclocal/xorg-macros.m4: file changed
>> as we read it
>>
>> This kind of error is harmless, use --ignore-failed-read to ignore it.
>>
> I am not sure it's so harmless, what if the file is corrupted, then we
> have a bad sstate tarball. You have identified the part of the root
> cause being the hardlink, but what if the file actually does change
> (which would be a different bug potentially), then your packaging a
> differet set of macros (in this case) with the sysroot.
>
>
> Sau!
The file is not corrupted, and the file content is not changed, "tar"
said xorg-macros.m4 file is changed, since the number of links of
xorg-macros.m4 has changed when other packages is doing configuration
and call autotools_copy_aclocal to make a hardlink to ${ACLOCALDIR}
If this fix can be accepted, I will rework the commit header.
-Roy
>
>> Signed-off-by: Roy.Li <rongqing.li at windriver.com>
>> ---
>> meta/classes/sstate.bbclass | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
>> index c1ca54b..3e2fedd 100644
>> --- a/meta/classes/sstate.bbclass
>> +++ b/meta/classes/sstate.bbclass
>> @@ -565,7 +565,7 @@ sstate_create_package () {
>> TFILE=`mktemp ${SSTATE_PKG}.XXXXXXXX`
>> # Need to handle empty directories
>> if [ "$(ls -A)" ]; then
>> - tar -czf $TFILE *
>> + tar --ignore-failed-read -czf $TFILE *
>> else
>> tar -cz --file=$TFILE --files-from=/dev/null
>> fi
>>
>
>
--
Best Reagrds,
Roy | RongQing Li
More information about the Openembedded-core
mailing list