All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] uninative: add variables to the whitelist so that it does not re-triger recipe parsing
@ 2018-03-16 17:31 Cuero Bugot
  2018-03-16 23:00 ` Khem Raj
  0 siblings, 1 reply; 8+ messages in thread
From: Cuero Bugot @ 2018-03-16 17:31 UTC (permalink / raw)
  To: openembedded-core@lists.openembedded.org

When uninative is activated (poky's default) internal datastore variables are modified (NATIVELSBSTRING and SSTATEPOSTUNPACKFUNCS) to enable uninative
support. This is happening after parsing is done at the beginning of the build. On the next bitbake call the recipe would be parsed if the two
variables above were not added to the parsing whitelist BB_HASHCONFIG_WHITELIST.

The fix is to add these two variables to the recipe parsing whitelist BB_HASHCONFIG_WHITELIST, this is done at recipe parsing time, only when
uninative.bbclass is used.

Signed-off-by: Cuero Bugot <cbugot@sierrawireless.com>
---
 meta/classes/uninative.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/uninative.bbclass b/meta/classes/uninative.bbclass
index 8f34483..d1fdbc8 100644
--- a/meta/classes/uninative.bbclass
+++ b/meta/classes/uninative.bbclass
@@ -8,6 +8,9 @@ UNINATIVE_TARBALL ?= "${BUILD_ARCH}-nativesdk-libc.tar.bz2"
 #UNINATIVE_CHECKSUM[x86_64] = "dead"
 UNINATIVE_DLDIR ?= "${DL_DIR}/uninative/"
 
+# Enabling uninative will change the following variables so they need to go the parsing white list to prevent multiple recipe parsing
+BB_HASHCONFIG_WHITELIST += "NATIVELSBSTRING SSTATEPOSTUNPACKFUNCS"
+
 addhandler uninative_event_fetchloader
 uninative_event_fetchloader[eventmask] = "bb.event.BuildStarted"
 
-- 
2.7.4


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

* Re: [PATCH] uninative: add variables to the whitelist so that it does not re-triger recipe parsing
  2018-03-16 17:31 Cuero Bugot
@ 2018-03-16 23:00 ` Khem Raj
  2018-03-19 13:58   ` Cuero Bugot
  0 siblings, 1 reply; 8+ messages in thread
From: Khem Raj @ 2018-03-16 23:00 UTC (permalink / raw)
  To: Cuero Bugot; +Cc: openembedded-core@lists.openembedded.org

[-- Attachment #1: Type: text/plain, Size: 1911 bytes --]

On Fri, Mar 16, 2018 at 10:31 AM Cuero Bugot <cbugot@sierrawireless.com>
wrote:

> When uninative is activated (poky's default) internal datastore variables
> are modified (NATIVELSBSTRING and SSTATEPOSTUNPACKFUNCS) to enable uninative
> support. This is happening after parsing is done at the beginning of the
> build. On the next bitbake call the recipe would be parsed if the two
> variables above were not added to the parsing whitelist
> BB_HASHCONFIG_WHITELIST.
>
> The fix is to add these two variables to the recipe parsing whitelist
> BB_HASHCONFIG_WHITELIST, this is done at recipe parsing time, only when
> uninative.bbclass is used.


It seems you have a case where data is already parsed and then uninstive is
enabled after this the reparse is happening. Or is it always happening when
uninative is enabled

>
>
> Signed-off-by: Cuero Bugot <cbugot@sierrawireless.com>
> ---
>  meta/classes/uninative.bbclass | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/meta/classes/uninative.bbclass
> b/meta/classes/uninative.bbclass
> index 8f34483..d1fdbc8 100644
> --- a/meta/classes/uninative.bbclass
> +++ b/meta/classes/uninative.bbclass
> @@ -8,6 +8,9 @@ UNINATIVE_TARBALL ?= "${BUILD_ARCH}-nativesdk-libc.tar.bz2"
>  #UNINATIVE_CHECKSUM[x86_64] = "dead"
>  UNINATIVE_DLDIR ?= "${DL_DIR}/uninative/"
>
> +# Enabling uninative will change the following variables so they need to
> go the parsing white list to prevent multiple recipe parsing
> +BB_HASHCONFIG_WHITELIST += "NATIVELSBSTRING SSTATEPOSTUNPACKFUNCS"
> +
>  addhandler uninative_event_fetchloader
>  uninative_event_fetchloader[eventmask] = "bb.event.BuildStarted"
>
> --
> 2.7.4
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 2669 bytes --]

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

* Re: [PATCH] uninative: add variables to the whitelist so that it does not re-triger recipe parsing
@ 2018-03-19 13:57 Cuero Bugot
  2018-03-30 12:45 ` Cuero Bugot
  0 siblings, 1 reply; 8+ messages in thread
From: Cuero Bugot @ 2018-03-19 13:57 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core@lists.openembedded.org

> > On Fri, Mar 16, 2018 at 10:31 AM Cuero Bugot <mailto:cbugot@sierrawireless.com> wrote:
> > When uninative is activated (poky's default) internal datastore variables are modified (NATIVELSBSTRING and SSTATEPOSTUNPACKFUNCS) to enable uninative
> > support. This is happening after parsing is done at the beginning of the build. On the next bitbake call the recipe would be parsed if the two
> > variables above were not added to the parsing whitelist BB_HASHCONFIG_WHITELIST.
> >
> > The fix is to add these two variables to the recipe parsing whitelist BB_HASHCONFIG_WHITELIST, this is done at recipe parsing time, only when
> > uninative.bbclass is used.

> It seems you have a case where data is already parsed and then uninstive is enabled after this the reparse is happening. Or is it always happening when uninative is enabled 

It is always happening when uninative is enabled (which is poky's default). The 2 first times you build you will have a full recipe parsing.
The reason is that the data is effectively modified on reception of BuildStarted event that happens after the parsing is done. Next time you run bitbake, the datastore signature is different and thus retrigger a recipe aprsing.

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

* Re: [PATCH] uninative: add variables to the whitelist so that it does not re-triger recipe parsing
  2018-03-16 23:00 ` Khem Raj
@ 2018-03-19 13:58   ` Cuero Bugot
  0 siblings, 0 replies; 8+ messages in thread
From: Cuero Bugot @ 2018-03-19 13:58 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core@lists.openembedded.org

> > On Fri, Mar 16, 2018 at 10:31 AM Cuero Bugot <mailto:cbugot@sierrawireless.com> wrote:
> > When uninative is activated (poky's default) internal datastore variables are modified (NATIVELSBSTRING and SSTATEPOSTUNPACKFUNCS) to enable uninative
> > support. This is happening after parsing is done at the beginning of the build. On the next bitbake call the recipe would be parsed if the two
> > variables above were not added to the parsing whitelist BB_HASHCONFIG_WHITELIST.
> >
> > The fix is to add these two variables to the recipe parsing whitelist BB_HASHCONFIG_WHITELIST, this is done at recipe parsing time, only when
> > uninative.bbclass is used.

> It seems you have a case where data is already parsed and then uninstive is enabled after this the reparse is happening. Or is it always happening when uninative is enabled 

It is always happening when uninative is enabled (

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

* Re: [PATCH] uninative: add variables to the whitelist so that it does not re-triger recipe parsing
  2018-03-19 13:57 [PATCH] uninative: add variables to the whitelist so that it does not re-triger recipe parsing Cuero Bugot
@ 2018-03-30 12:45 ` Cuero Bugot
  2018-04-03 13:56   ` Richard Purdie
  0 siblings, 1 reply; 8+ messages in thread
From: Cuero Bugot @ 2018-03-30 12:45 UTC (permalink / raw)
  To: openembedded-core@lists.openembedded.org


> > > On Fri, Mar 16, 2018 at 10:31 AM Cuero Bugot <mailto:cbugot@sierrawireless.com> wrote:
> > > When uninative is activated (poky's default) internal datastore 
> > > variables are modified (NATIVELSBSTRING and SSTATEPOSTUNPACKFUNCS) 
> > > to enable uninative support. This is happening after parsing is done at the beginning of the build. On the next bitbake call the recipe would be parsed if the two variables above were not added to the parsing whitelist BB_HASHCONFIG_WHITELIST.
> > >
> > > The fix is to add these two variables to the recipe parsing 
> > > whitelist BB_HASHCONFIG_WHITELIST, this is done at recipe parsing time, only when uninative.bbclass is used.
>
> > It seems you have a case where data is already parsed and then 
> > uninstive is enabled after this the reparse is happening. Or is it 
> > always happening when uninative is enabled
>
> It is always happening when uninative is enabled (which is poky's default). The 2 first times you build you will have a full recipe parsing.
> The reason is that the data is effectively modified on reception of BuildStarted event that happens after the parsing is done. Next time you run bitbake, the datastore signature is different and thus retrigger a recipe aprsing.

Anything I could do help make merge-in this proposal?

Thx,
Cuero

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

* Re: [PATCH] uninative: add variables to the whitelist so that it does not re-triger recipe parsing
  2018-03-30 12:45 ` Cuero Bugot
@ 2018-04-03 13:56   ` Richard Purdie
  2018-04-03 14:15     ` Cuero Bugot
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Purdie @ 2018-04-03 13:56 UTC (permalink / raw)
  To: Cuero Bugot, openembedded-core@lists.openembedded.org

On Fri, 2018-03-30 at 12:45 +0000, Cuero Bugot wrote:
> > 
> > > 
> > > > 
> > > > On Fri, Mar 16, 2018 at 10:31 AM Cuero Bugot <mailto:cbugot@sie
> > > > rrawireless.com> wrote:
> > > > When uninative is activated (poky's default) internal
> > > > datastore 
> > > > variables are modified (NATIVELSBSTRING and
> > > > SSTATEPOSTUNPACKFUNCS) 
> > > > to enable uninative support. This is happening after parsing is
> > > > done at the beginning of the build. On the next bitbake call
> > > > the recipe would be parsed if the two variables above were not
> > > > added to the parsing whitelist BB_HASHCONFIG_WHITELIST.
> > > > 
> > > > The fix is to add these two variables to the recipe parsing 
> > > > whitelist BB_HASHCONFIG_WHITELIST, this is done at recipe
> > > > parsing time, only when uninative.bbclass is used.
> > > 
> > > It seems you have a case where data is already parsed and then 
> > > uninstive is enabled after this the reparse is happening. Or is
> > > it 
> > > always happening when uninative is enabled
> > It is always happening when uninative is enabled (which is poky's
> > default). The 2 first times you build you will have a full recipe
> > parsing.
> > The reason is that the data is effectively modified on reception of
> > BuildStarted event that happens after the parsing is done. Next
> > time you run bitbake, the datastore signature is different and thus
> > retrigger a recipe aprsing.
> Anything I could do help make merge-in this proposal?

Sorry about the delay, I wanted to check that we shouldn't be teaching
get_hash() in data_smart.py in bitbake something about excludevardeps
to make it work better.

In short the answer is that no, we shouldn't and your patch is the
better option. I've queued it in sumo-next. Thanks for figuring it out
as it is an annoying problem.

Cheers,

Richard


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

* Re: [PATCH] uninative: add variables to the whitelist so that it does not re-triger recipe parsing
  2018-04-03 13:56   ` Richard Purdie
@ 2018-04-03 14:15     ` Cuero Bugot
  2018-04-04 20:08       ` Randy MacLeod
  0 siblings, 1 reply; 8+ messages in thread
From: Cuero Bugot @ 2018-04-03 14:15 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core@lists.openembedded.org

> In short the answer is that no, we shouldn't and your patch is the better option. I've queued it in sumo-next. Thanks for figuring it out as it is an annoying problem.

Hey no prb ! Given he traffic on this list I understand everyone is busy!
Would it be possible to add it to rocko-next  as well ? (the patch applies as is) (I ask in my self interest as we are using rocko as of now); or does it contradict specific policies for released branches ?
Thx,
Cuero

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

* Re: [PATCH] uninative: add variables to the whitelist so that it does not re-triger recipe parsing
  2018-04-03 14:15     ` Cuero Bugot
@ 2018-04-04 20:08       ` Randy MacLeod
  0 siblings, 0 replies; 8+ messages in thread
From: Randy MacLeod @ 2018-04-04 20:08 UTC (permalink / raw)
  To: Cuero Bugot, Richard Purdie,
	openembedded-core@lists.openembedded.org, Armin Kuster

On 2018-04-03 10:15 AM, Cuero Bugot wrote:
>> In short the answer is that no, we shouldn't and your patch is the better option. I've queued it in sumo-next. Thanks for figuring it out as it is an annoying problem.
> 
> Hey no prb ! Given he traffic on this list I understand everyone is busy!
> Would it be possible to add it to rocko-next  as well ? (the patch applies as is) (I ask in my self interest as we are using rocko as of now); or does it contradict specific policies for released branches ?

I'm not sure if there's any objection to backporting this patch but
Armin is the guy to ask about that. I've added him to the thread in case
he missed your rocko reference.

Usually, a patch has to be in master and not just master-next
before being backported IIRC, so give it a few days.

../Randy

> Thx,
> Cuero
> 


-- 
# Randy MacLeod.  WR Linux
# Wind River


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

end of thread, other threads:[~2018-04-04 20:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-19 13:57 [PATCH] uninative: add variables to the whitelist so that it does not re-triger recipe parsing Cuero Bugot
2018-03-30 12:45 ` Cuero Bugot
2018-04-03 13:56   ` Richard Purdie
2018-04-03 14:15     ` Cuero Bugot
2018-04-04 20:08       ` Randy MacLeod
  -- strict thread matches above, loose matches on Subject: below --
2018-03-16 17:31 Cuero Bugot
2018-03-16 23:00 ` Khem Raj
2018-03-19 13:58   ` Cuero Bugot

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.