[OE-core] [PATCH v4 07/10] bitbake: runqueue: Pass unique hash to hash validate

Richard Purdie richard.purdie at linuxfoundation.org
Tue Dec 18 16:24:04 UTC 2018


On Tue, 2018-12-18 at 09:30 -0600, Joshua Watt wrote:
> If the unique hash is being used to track task dependencies, the hash
> validation function needs to know about it in order to properly validate
> the hash.
> 
> [YOCTO #13030]
> 
> Signed-off-by: Joshua Watt <JPEWhacker at gmail.com>
> ---
>  bitbake/lib/bb/runqueue.py | 38 +++++++++++++++++++++++++++-----------
>  1 file changed, 27 insertions(+), 11 deletions(-)
> 
> diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
> index de57dcb37b8..161f53c7cb1 100644
> --- a/bitbake/lib/bb/runqueue.py
> +++ b/bitbake/lib/bb/runqueue.py
> @@ -1378,6 +1378,23 @@ class RunQueue:
>              cache[tid] = iscurrent
>          return iscurrent
>  
> +    def validate_hash(self, *, sq_fn, sq_task, sq_hash, sq_hashfn, siginfo, sq_unihash, d):
> +        locs = {"sq_fn" : sq_fn, "sq_task" : sq_task, "sq_hash" : sq_hash, "sq_hashfn" : sq_hashfn,
> +                "sq_unihash" : sq_unihash, "siginfo" : siginfo, "d" : d}
> +
> +        for hashvalidate_args in ("(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=siginfo, sq_unihash=sq_unihash)",
> +                                  "(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=siginfo)"):
> +            try:
> +                call = self.hashvalidate + hashvalidate_args
> +                return bb.utils.better_eval(call, locs)
> +            except TypeError:
> +                continue
> +
> +        # If none of the hash validate functions worked, try one more time
> +        # with the oldest type
> +        call = self.hashvalidate + "(sq_fn, sq_task, sq_hash, sq_hashfn, sq_unihash, d)"
> +        return bb.utils.better_eval(call, locs)


I think sq_unihash shouldn't be in this last fallback option. You copy
and pasted from your updated code rather than the original (pre
unihash?) You could add (sq_fn, sq_task, sq_hash, sq_hashfn) to the
args list?

Cheers,

Richard



More information about the Openembedded-core mailing list