On Tue, 2018-12-18 at 16:24 +0000, Richard Purdie wrote: > 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 <jpewhac...@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?
Oops, yep I'll fix that. The reason I did it like this to make it not suppress the final TypeError if the last try failed.... I wasn't sure if there was some other error I should raise instead if we exit the loop when they all fail? > > Cheers, > > Richard > -- Joshua Watt <jpewhac...@gmail.com> -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core