All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] scons.bbclass: Force rebuild if necessary
@ 2018-11-13 10:17 Andreas Müller
  2018-11-13 10:17 ` [PATCH 2/2] scons.bbclass: fix indention Andreas Müller
  2018-11-13 11:06 ` [PATCH 1/2] scons.bbclass: Force rebuild if necessary Burton, Ross
  0 siblings, 2 replies; 5+ messages in thread
From: Andreas Müller @ 2018-11-13 10:17 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Andreas Müller <schnitzeltony@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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] scons.bbclass: fix indention
  2018-11-13 10:17 [PATCH 1/2] scons.bbclass: Force rebuild if necessary Andreas Müller
@ 2018-11-13 10:17 ` Andreas Müller
  2018-11-13 11:06 ` [PATCH 1/2] scons.bbclass: Force rebuild if necessary Burton, Ross
  1 sibling, 0 replies; 5+ messages in thread
From: Andreas Müller @ 2018-11-13 10:17 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
 meta/classes/scons.bbclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/scons.bbclass b/meta/classes/scons.bbclass
index 286843f74c..9ee7d1587d 100644
--- a/meta/classes/scons.bbclass
+++ b/meta/classes/scons.bbclass
@@ -14,13 +14,13 @@ do_configure() {
 }
 
 scons_do_compile() {
-        ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
-        die "scons build execution failed."
+	${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
+	die "scons build execution failed."
 }
 
 scons_do_install() {
-        ${STAGING_BINDIR_NATIVE}/scons install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \
-        die "scons install execution failed."
+	${STAGING_BINDIR_NATIVE}/scons install_root=${D}${prefix} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} install || \
+	die "scons install execution failed."
 }
 
 EXPORT_FUNCTIONS do_compile do_install
-- 
2.14.5



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] scons.bbclass: Force rebuild if necessary
  2018-11-13 10:17 [PATCH 1/2] scons.bbclass: Force rebuild if necessary Andreas Müller
  2018-11-13 10:17 ` [PATCH 2/2] scons.bbclass: fix indention Andreas Müller
@ 2018-11-13 11:06 ` Burton, Ross
  2018-11-13 12:22   ` Andreas Müller
  1 sibling, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2018-11-13 11:06 UTC (permalink / raw)
  To: Andreas Müller; +Cc: OE-core

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@gmail.com> wrote:
>
> Signed-off-by: Andreas Müller <schnitzeltony@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
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] scons.bbclass: Force rebuild if necessary
  2018-11-13 11:06 ` [PATCH 1/2] scons.bbclass: Force rebuild if necessary Burton, Ross
@ 2018-11-13 12:22   ` Andreas Müller
  2018-11-13 18:50     ` Martin Hundebøll
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Müller @ 2018-11-13 12:22 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer

On Tue, Nov 13, 2018 at 12:06 PM Burton, Ross <ross.burton@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@gmail.com> wrote:
> >
> > Signed-off-by: Andreas Müller <schnitzeltony@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]:

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] scons.bbclass: Force rebuild if necessary
  2018-11-13 12:22   ` Andreas Müller
@ 2018-11-13 18:50     ` Martin Hundebøll
  0 siblings, 0 replies; 5+ messages in thread
From: Martin Hundebøll @ 2018-11-13 18:50 UTC (permalink / raw)
  To: Andreas Müller, Burton, Ross
  Cc: Patches and discussions about the oe-core layer

On 13/11/2018 13.22, Andreas Müller wrote:
> On Tue, Nov 13, 2018 at 12:06 PM Burton, Ross <ross.burton@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@gmail.com> wrote:
>>>
>>> Signed-off-by: Andreas Müller <schnitzeltony@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@geanix.com

Geanix IVS
https://geanix.com
DK39600706


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-13 18:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13 10:17 [PATCH 1/2] scons.bbclass: Force rebuild if necessary Andreas Müller
2018-11-13 10:17 ` [PATCH 2/2] scons.bbclass: fix indention Andreas Müller
2018-11-13 11:06 ` [PATCH 1/2] scons.bbclass: Force rebuild if necessary Burton, Ross
2018-11-13 12:22   ` Andreas Müller
2018-11-13 18:50     ` Martin Hundebøll

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.