[OE-core] bitbake/runqueue: Fix 'full' stamp checking to be more efficient and cache results

Chris Larson clarson at kergoth.com
Thu May 10 00:03:07 UTC 2012


On Wed, May 9, 2012 at 4:57 PM, Richard Purdie
<richard.purdie at linuxfoundation.org> wrote:
> diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
> index b870caf..48433be 100644
> --- a/bitbake/lib/bb/runqueue.py
> +++ b/bitbake/lib/bb/runqueue.py
> @@ -875,7 +875,7 @@ class RunQueue:
>             bb.msg.fatal("RunQueue", "check_stamps fatal internal error")
>         return current
>
> -    def check_stamp_task(self, task, taskname = None, recurse = False):
> +    def check_stamp_task(self, task, taskname = None, recurse = False, cache = {}):

When people do this, it's typically a bug, but I presume you're doing
it intentionally here? Use of mutable default values is often
problematic due to their being shared across all calls to that
function, but that's okay for a cache. Maybe you intended this, given
it's a cache, but I wanted to ensure it was a conscious choice. Also,
this adds yet another global cache with no form of invalidation /
clear at all, it'll continue to grow through the lifetime of the
process.
-- 
Christopher Larson




More information about the Openembedded-core mailing list