summaryrefslogtreecommitdiffstats
path: root/bitbake/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-30 12:01:29 +0100
commit292c3e82e3452710a238db6312c9c71ba5416915 (patch)
treeeeb4d9d4c2ea77f956900a2698ce1799cbaecd6e /bitbake/lib/bb/checksum.py
parent326fc2916eacfbd5ae2508cdcf7cb486d16cb861 (diff)
downloadpoky-292c3e82e3452710a238db6312c9c71ba5416915.tar.gz
bitbake: 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] (Bitbake rev: 66dff37ebcd1dd14ebd6933d727df9cf0a641866) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/checksum.py')
-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 7fb46d8db5..2ec964d73b 100644
--- a/bitbake/lib/bb/checksum.py
+++ b/bitbake/lib/bb/checksum.py
@@ -123,12 +123,14 @@ class FileChecksumCache(MultiProcessCache):
123 # Handle globs 123 # Handle globs
124 for f in glob.glob(pth): 124 for f in glob.glob(pth):
125 if os.path.isdir(f): 125 if os.path.isdir(f):
126 checksums.extend(checksum_dir(f)) 126 if not os.path.islink(f):
127 checksums.extend(checksum_dir(f))
127 else: 128 else:
128 checksum = checksum_file(f) 129 checksum = checksum_file(f)
129 checksums.append((f, checksum)) 130 checksums.append((f, checksum))
130 elif os.path.isdir(pth): 131 elif os.path.isdir(pth):
131 checksums.extend(checksum_dir(pth)) 132 if not os.path.islink(pth):
133 checksums.extend(checksum_dir(pth))
132 else: 134 else:
133 checksum = checksum_file(pth) 135 checksum = checksum_file(pth)
134 checksums.append((pth, checksum)) 136 checksums.append((pth, checksum))