From 99c27e5874e874d681b6e7fe07f31e163d1d955a Mon Sep 17 00:00:00 2001 From: Aníbal Limón Date: Fri, 15 Nov 2019 08:47:23 -0600 Subject: bitbake: lib/bb: Add BB_SIGNATURE_LOCAL_DIRS_EXCLUDE to speed-up taskhash on directories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new BB_SIGNATURE_LOCAL_DIRS_EXCLUDE allows you to specify a list of directories to exclude when making taskhash, our specific case is using SRC_URI that points local VCS directory. Use bb.fetch.module to set default to: "CVS .bzr .git .hg .osc .p4 .repo .svn" (Bitbake rev: 923aff060d8aba8456979c35b16d300ba7c13ff9) Signed-off-by: Aníbal Limón Signed-off-by: Richard Purdie --- bitbake/lib/bb/checksum.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bb/checksum.py') diff --git a/bitbake/lib/bb/checksum.py b/bitbake/lib/bb/checksum.py index 5bc8a8fcb6..677020f497 100644 --- a/bitbake/lib/bb/checksum.py +++ b/bitbake/lib/bb/checksum.py @@ -74,7 +74,7 @@ class FileChecksumCache(MultiProcessCache): else: dest[0][h] = source[0][h] - def get_checksums(self, filelist, pn): + def get_checksums(self, filelist, pn, localdirsexclude): """Get checksums for a list of files""" def checksum_file(f): @@ -90,7 +90,8 @@ class FileChecksumCache(MultiProcessCache): if pth == "/": bb.fatal("Refusing to checksum /") dirchecksums = [] - for root, dirs, files in os.walk(pth): + for root, dirs, files in os.walk(pth, topdown=True): + [dirs.remove(d) for d in list(dirs) if d in localdirsexclude] for name in files: fullpth = os.path.join(root, name) checksum = checksum_file(fullpth) -- cgit v1.2.3-54-g00ecf