summaryrefslogtreecommitdiffstats
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>2017-05-18 13:12:06 +0100
commitc60f952a5adb1bcbab403779ce08927759bcfb63 (patch)
treeb794dc021dec2117ce2a4c17902e3acd1b69e661
parent0b48acbf0428975e67012877417b9f90d3e1778c (diff)
downloadbitbake-c60f952a5adb1bcbab403779ce08927759bcfb63.tar.gz
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> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/checksum.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bb/checksum.py b/lib/bb/checksum.py
index 2ec964d73..44cb4aceb 100644
--- a/lib/bb/checksum.py
+++ b/lib/bb/checksum.py
@@ -127,13 +127,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