aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/checksum.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-07-26 15:36:40 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-29 09:53:32 +0100
commit2a849e7e9be6040bd76b76c24263f63f8f693753 (patch)
treec39bee6eaa097ea14eeb488b0c6fddb06a0d89c3 /bitbake/lib/bb/checksum.py
parentea234239f41a94a4b13b68648d8dc611f793a441 (diff)
downloadopenembedded-core-contrib-2a849e7e9be6040bd76b76c24263f63f8f693753.tar.gz
bitbake: lib/bb/checksum: avoid exception on broken symlinks
If using OE's externalsrc with a source tree that is not tracked by git and contains broken symlinks, you can receive "TypeError: unorderable types: NoneType() < str()" within the file checksum code due to: checksums.sort(key=operator.itemgetter(1)) Don't add files with no checksum to the checksums list in order to avoid this. (Bitbake rev: 484fe5a3f5b840e5422cbdff0eef9aecfe944a19) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/checksum.py')
-rw-r--r--bitbake/lib/bb/checksum.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/checksum.py b/bitbake/lib/bb/checksum.py
index be4ab68915..84289208f4 100644
--- a/bitbake/lib/bb/checksum.py
+++ b/bitbake/lib/bb/checksum.py
@@ -120,13 +120,15 @@ class FileChecksumCache(MultiProcessCache):
checksums.extend(checksum_dir(f))
else:
checksum = checksum_file(f)
- checksums.append((f, checksum))
+ if checksum:
+ checksums.append((f, checksum))
elif os.path.isdir(pth):
if not os.path.islink(pth):
checksums.extend(checksum_dir(pth))
else:
checksum = checksum_file(pth)
- checksums.append((pth, checksum))
+ if checksum:
+ checksums.append((pth, checksum))
checksums.sort(key=operator.itemgetter(1))
return checksums