[OE-core] [PATCH 1/1] buildtools-tarball: add nativesdk-libxml2-utils

ChenQi Qi.Chen at windriver.com
Wed Jul 10 03:06:38 UTC 2019


On 07/09/2019 06:18 PM, Richard Purdie wrote:
> On Tue, 2019-07-09 at 17:36 +0800, ChenQi wrote:
>> On 07/09/2019 09:38 AM, ChenQi wrote:
>>> On 07/09/2019 12:47 AM, Richard Purdie wrote:
>>>> On Mon, 2019-07-08 at 15:37 +0800, Chen Qi wrote:
>>>>> For build-sysroots.bb, the xmlcatalog would not be in its
>>>>> staging directory. Causing the following error for eSDK.
>>>>>
>>>>> ERROR: build-sysroots-1.0-r0 do_build_native_sysroot: Command
>>>>> '/PATH/TO/IMAGE/testsdkext/tmp/sysroots/x86_64/usr/bin/postinst
>>>>> -
>>>>> docbook-xml-dtd4-native-xmlcatalog' returned non-zero exit
>>>>> status
>>>>> 127.
>>>>> ERROR: build-sysroots-1.0-r0 do_build_native_sysroot: Function
>>>>> failed: do_build_native_sysroot
>>>>>
>>>>> The problem could be reproduced by the following steps.
>>>>> 1. Add in local.conf:
>>>>>      IMAGE_INSTALL_append = " btrfs-tools"
>>>>>      DISTRO_FEATURES_append = " api-documentation"
>>>>>      INHERIT += "testsdk"
>>>>> 2. bitbake core-image-minimal -c populate_sdk_ext
>>>>> 3. bitbake core-image-minimal -c testsdkext
>>>>>
>>>>> So we add nativesdk-libxml2-utils to buildtools-tarball
>>>>> to ensure the existence of xmlcatalog. Also add it
>>>>> to HOSTTOOLS_NONFATAL so it could be seen by bitbake.
>>>>>
>>>>> Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
>>>>> ---
>>>>>    meta/conf/bitbake.conf                       | 3 +++
>>>>>    meta/recipes-core/meta/buildtools-tarball.bb | 1 +
>>>>>    2 files changed, 4 insertions(+)
>>>>>
>>>>> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
>>>>> index 5e93f5c..2f64eae 100644
>>>>> --- a/meta/conf/bitbake.conf
>>>>> +++ b/meta/conf/bitbake.conf
>>>>> @@ -517,6 +517,9 @@ HOSTTOOLS_NONFATAL += "scp"
>>>>>    # Link to git-lfs if present
>>>>>    HOSTTOOLS_NONFATAL += "git-lfs"
>>>>>    +# build-sysroot needs xmlcatalog in order for eSDK
>>>>> installation
>>>>> +HOSTTOOLS_NONFATAL += "xmlcatalog"
>>>> I don't mind the buildtools-tarball change but HOSTTOOLS is
>>>> starting to
>>>> grow to contain far too much random stuff which could impact
>>>> reproduciblity.
>>>>
>>>> Is there some other way we could fix this? It still feels like a
>>>> dependency problem which we chould fix by adding a missing
>>>> dependency
>>>> although I appreciate its far from being that simple.
>>>>
>>>> I wonder if there is a way we could teach build-sysroots to be
>>>> cleverer
>>>> about dependencies?
>>> I'll try to implement it and send out a new patch.
>> Unfortunately I cannot figure out a good way to implement this.
>> Could you please help giving me some hints?
> What happens if we add:
>
> ${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'nativesdk-libxml2', '', d)} \
>
> to
> `
> meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
>
> ?

This does not work. Using nativesdk-libxml2-utils does not work too.
Both buildtools and eSDK do not use this packagegroup.

I've sent out a V2 of this patch, with change to put the 
'libxml2-native' dependency in xmlcatalog.bbclass.
In this way, we can ensure that the xmlcatalog is from our recipe. In 
normal build, it's from libxml2-native; in build-sysroots in eSDK, it's 
from nativesdk-libxml2-utils. Do you think this is acceptable?

Best Regards,
Chen Qi

> Cheers,
>
> Richard
>
>



More information about the Openembedded-core mailing list