[OE-core] [PATCH 1/2] scons.bbclass: Force rebuild if necessary

Martin Hundebøll martin at geanix.com
Tue Nov 13 18:50:17 UTC 2018


On 13/11/2018 13.22, Andreas Müller wrote:
> On Tue, Nov 13, 2018 at 12:06 PM Burton, Ross <ross.burton at intel.com> wrote:
>>
>> This make me look at scons a bit closer, somewhat in shock that it
>> doesn't have a native way of doing out of tree builds.  Apparently
>> abusing the repository argument will sometimes work for out of tree
>> (so you could just put B=$WORKDIR/build and add B to [cleandirs]) but
>> abusing sounds like 'doesn't always work' to me.
>>
>> I then discovered that the one recipe in oe-core that uses scons
>> doesn't in fact use the class, and switching to it breaks because
>> there's no standard way of passing install paths (serf tries to
>> install to /usr on the host).
>>
>> So how is your experience with the scons class? Is it actually useful?
>>
>> Ross
>> On Tue, 13 Nov 2018 at 10:18, Andreas Müller <schnitzeltony at gmail.com> wrote:
>>>
>>> Signed-off-by: Andreas Müller <schnitzeltony at gmail.com>
>>> ---
>>>   meta/classes/scons.bbclass | 11 ++++++++++-
>>>   1 file changed, 10 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/meta/classes/scons.bbclass b/meta/classes/scons.bbclass
>>> index b9ae19d582..286843f74c 100644
>>> --- a/meta/classes/scons.bbclass
>>> +++ b/meta/classes/scons.bbclass
>>> @@ -2,7 +2,16 @@ DEPENDS += "python-scons-native"
>>>
>>>   EXTRA_OESCONS ?= ""
>>>
>>> -do_configure[noexec] = "1"
>>> +do_configure() {
>>> +       if [ -n "${CONFIGURESTAMPFILE}" ]; then
>>> +               if [ -e "${CONFIGURESTAMPFILE}" -a "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${CLEANBROKEN}" != "1" ]; then
>>> +                       ${STAGING_BINDIR_NATIVE}/scons --clean PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS}
>>> +               fi
>>> +
>>> +               mkdir -p `dirname ${CONFIGURESTAMPFILE}`
>>> +               echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
>>> +       fi
>>> +}
>>>
>>>   scons_do_compile() {
>>>           ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
>>> --
>>> 2.14.5
>>>
> Have few recipes in my layers inheriting scons. I build them
> frequently in my running 'world image' [1]:

I use gpsd from meta-oe, which "works" too...

// Martin

> meta-games/recipes-games/pingus/pingus_0.7.6.bb -> Builds 'fine' currently
> meta-qt5-extra/recipes-misc/recipes-multimedia/mixxx/mixxx_git.bb
> There are others I don't use:
> meta-openembedded/meta-oe/recipes-dbs/mongodb/mongodb_git.bb
> meta-openembedded/meta-oe/recipes-navigation/gpsd/gpsd_3.17.bb
> 
> Mixxx (has QA issues I am trying to fix) is the one on which I found
> out that rebuild is not performed in case recipes are changed on which
> mixxx depends on.
> 
> So yes I consider this class useful :)
> 
> [1] https://github.com/schnitzeltony/meta-mortsgna/blob/master/recipes-image/allgui/allgui-full-image.bb
> 
> Andreas
> 

-- 
Kind regards,
Martin Hundebøll
Embedded Linux Consultant

+45 61 65 54 61
martin at geanix.com

Geanix IVS
https://geanix.com
DK39600706


More information about the Openembedded-core mailing list