summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/siggen.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-06-02 14:46:13 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-07 22:29:25 +0100
commit911e8bb56abac938c6a6bf042844fdaa126970a3 (patch)
treec0573097a2b0e8a5e28fc90071a9b924c9eb850b /bitbake/lib/bb/siggen.py
parent3eed3aac4cfe1db74f0cabfea391ca3578ef70f3 (diff)
downloadpoky-911e8bb56abac938c6a6bf042844fdaa126970a3.tar.gz
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 <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/siggen.py')
-rw-r--r--bitbake/lib/bb/siggen.py8
1 files changed, 5 insertions, 3 deletions
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):
82 data = d.getVar(task, False) 82 data = d.getVar(task, False)
83 lookupcache[task] = data 83 lookupcache[task] = data
84 84
85 if data is None:
86 bb.error("Task %s from %s seems to be empty?!" % (task, fn))
87 data = ''
88
85 newdeps = gendeps[task] 89 newdeps = gendeps[task]
86 seen = set() 90 seen = set()
87 while newdeps: 91 while newdeps:
@@ -103,9 +107,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
103 var = d.getVar(dep, False) 107 var = d.getVar(dep, False)
104 lookupcache[dep] = var 108 lookupcache[dep] = var
105 if var: 109 if var:
106 data = data + var 110 data = data + str(var)
107 if data is None:
108 bb.error("Task %s from %s seems to be empty?!" % (task, fn))
109 self.basehash[fn + "." + task] = hashlib.md5(data).hexdigest() 111 self.basehash[fn + "." + task] = hashlib.md5(data).hexdigest()
110 taskdeps[task] = sorted(alldeps) 112 taskdeps[task] = sorted(alldeps)
111 113