summaryrefslogtreecommitdiffstats
path: root/bitbake
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:30 +0100
commit95dae8b59854633aa66a9377c493a6bffcdf49a6 (patch)
tree006e63a5feb0b7f68c2952f9b13043c1294654b3 /bitbake
parent129060f0b7125f6ac5bbdfcd5f683a3d8ca318c4 (diff)
downloadpoky-95dae8b59854633aa66a9377c493a6bffcdf49a6.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) (Bitbake rev: c60f952a5adb1bcbab403779ce08927759bcfb63) 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>
Diffstat (limited to 'bitbake')
-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 2ec964d73b..44cb4acebb 100644
--- a/bitbake/lib/bb/checksum.py
+++ b/bitbake/lib/bb/checksum.py
@@ -127,13 +127,15 @@ class FileChecksumCache(MultiProcessCache):
127 checksums.extend(checksum_dir(f)) 127 checksums.extend(checksum_dir(f))
128 else: 128 else:
129 checksum = checksum_file(f) 129 checksum = checksum_file(f)
130 checksums.append((f, checksum)) 130 if checksum:
131 checksums.append((f, checksum))
131 elif os.path.isdir(pth): 132 elif os.path.isdir(pth):
132 if not os.path.islink(pth): 133 if not os.path.islink(pth):
133 checksums.extend(checksum_dir(pth)) 134 checksums.extend(checksum_dir(pth))
134 else: 135 else:
135 checksum = checksum_file(pth) 136 checksum = checksum_file(pth)
136 checksums.append((pth, checksum)) 137 if checksum:
138 checksums.append((pth, checksum))
137 139
138 checksums.sort(key=operator.itemgetter(1)) 140 checksums.sort(key=operator.itemgetter(1))
139 return checksums 141 return checksums