summaryrefslogtreecommitdiffstats
path: root/lib/bb/checksum.py
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-03-29 16:04:19 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-29 23:21:28 +0100
commit66dff37ebcd1dd14ebd6933d727df9cf0a641866 (patch)
tree59a117f13fe47ea1671358251e5c79ab13f3b1ff /lib/bb/checksum.py
parent148aa1fb45dcb37a756a08301a7daf270e753180 (diff)
downloadbitbake-contrib-66dff37ebcd1dd14ebd6933d727df9cf0a641866.tar.gz
checksum: In FileChecksumCache don't follow directory symlinks
Before this patch, directory symlinks mathcing filename pattern (either a file name or a glob pattern) were followed. However, directory symlinks deeper in the search chain were omitted by os.walk(). Now directory traversal behaves consistently, ignoring syminks on all levels. One reason for choosing not to "walk into" directory symlinks is that dir symlinks in externalsrc.bbclass in oe-core are causing problems in source tree checksumming. [YOCTO #8853] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/checksum.py')
-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 7fb46d8db..2ec964d73 100644
--- a/lib/bb/checksum.py
+++ b/lib/bb/checksum.py
@@ -123,12 +123,14 @@ class FileChecksumCache(MultiProcessCache):
# Handle globs
for f in glob.glob(pth):
if os.path.isdir(f):
- checksums.extend(checksum_dir(f))
+ if not os.path.islink(f):
+ checksums.extend(checksum_dir(f))
else:
checksum = checksum_file(f)
checksums.append((f, checksum))
elif os.path.isdir(pth):
- checksums.extend(checksum_dir(pth))
+ if not os.path.islink(pth):
+ checksums.extend(checksum_dir(pth))
else:
checksum = checksum_file(pth)
checksums.append((pth, checksum))