From 95dae8b59854633aa66a9377c493a6bffcdf49a6 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 26 Jul 2016 15:36:40 +1200 Subject: 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 Signed-off-by: Richard Purdie Signed-off-by: Armin Kuster Signed-off-by: Richard Purdie --- bitbake/lib/bb/checksum.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bitbake') 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): 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 -- cgit v1.2.3-54-g00ecf