All of lore.kernel.org
 help / color / mirror / Atom feed
* python function used in variable expansion called multiple times per recipe
@ 2012-04-18 21:21 Daniel Lazzari
  2012-04-18 23:06 ` Christopher Larson
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel Lazzari @ 2012-04-18 21:21 UTC (permalink / raw)
  To: 'bitbake-devel@lists.openembedded.org' (bitbake-devel@lists.openembedded.org)

Hi everyone,

I've been wrestling with this problem for over a day now so I figured it's time to call in the cavalry.
I have a class in our layer that needs to fill in a variable (EXTERNPV) with information about svn externals in a project. This process can be very time consuming and resource intensive so I would prefer that it only happen once per run. Unfortunately, it seems to run 5 times for each recipe that inherits the class. You can easily duplicate the behavior  I see with the following:

def testFunc(bb, d):
	print( bb.data.getVar("PN", d, True) )
	return "e1"

EXTERNPV = "${@testFunc(bb, d)}"

Am I doing something wrong? Is there some assignment operator I can use to ensure this only has to be done once? Or maybe a variable flag?

As always, I very much appreciate the help.

Dan Lazzari Jr.
Firmware Engineer
dlazzari@leapfrog.com




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

end of thread, other threads:[~2012-04-20  1:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-18 21:21 python function used in variable expansion called multiple times per recipe Daniel Lazzari
2012-04-18 23:06 ` Christopher Larson
2012-04-18 23:39   ` Daniel Lazzari
2012-04-18 23:41     ` Chris Larson
2012-04-18 23:57       ` Daniel Lazzari
2012-04-19 21:24       ` Daniel Lazzari
2012-04-19 22:28         ` Richard Purdie
2012-04-19 23:13           ` Daniel Lazzari
2012-04-20  0:12             ` Chris Larson
2012-04-20  1:05               ` Daniel Lazzari
2012-04-19 23:34           ` McClintock Matthew-B29882

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.