From 911e8bb56abac938c6a6bf042844fdaa126970a3 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Thu, 2 Jun 2011 14:46:13 -0700 Subject: siggen: don't choke with traceback when data is None Given we use bb.error, not bb.fatal, here, it seems this was intended to be non-fatal, yet we'd end up trying to concatenate None. Fix this by setting an empty task to the empty string, for the purposes of hashing. Also str() the value we get from the datastore, just in case something other than a string was stored there. (Bitbake rev: ec8a5a495b72e061a1e8d7c7449afb26581872c0) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/siggen.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bitbake/lib/bb/siggen.py') diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py index 550280339c..a9c84c474f 100644 --- a/bitbake/lib/bb/siggen.py +++ b/bitbake/lib/bb/siggen.py @@ -82,6 +82,10 @@ class SignatureGeneratorBasic(SignatureGenerator): data = d.getVar(task, False) lookupcache[task] = data + if data is None: + bb.error("Task %s from %s seems to be empty?!" % (task, fn)) + data = '' + newdeps = gendeps[task] seen = set() while newdeps: @@ -103,9 +107,7 @@ class SignatureGeneratorBasic(SignatureGenerator): var = d.getVar(dep, False) lookupcache[dep] = var if var: - data = data + var - if data is None: - bb.error("Task %s from %s seems to be empty?!" % (task, fn)) + data = data + str(var) self.basehash[fn + "." + task] = hashlib.md5(data).hexdigest() taskdeps[task] = sorted(alldeps) -- cgit v1.2.3-54-g00ecf