[oe-commits] [bitbake] 05/05: lib/bb/checksum: avoid exception on broken symlinks
git at git.openembedded.org
git at git.openembedded.org
Thu May 18 12:14:59 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch 1.30
in repository bitbake.
commit c60f952a5adb1bcbab403779ce08927759bcfb63
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Tue Jul 26 15:36:40 2016 +1200
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 at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808 at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/checksum.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/bb/checksum.py b/lib/bb/checksum.py
index 2ec964d..44cb4ac 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
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list