diff options
author | Aníbal Limón <anibal.limon@linaro.org> | 2019-11-15 08:47:23 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-30 23:39:31 +0000 |
commit | 923aff060d8aba8456979c35b16d300ba7c13ff9 (patch) | |
tree | 1451850b5c7efbdb914976034722d8af047bdd24 /lib/bb/checksum.py | |
parent | a8e7e913407d5c381fd817689bab19208919f86e (diff) | |
download | bitbake-923aff060d8aba8456979c35b16d300ba7c13ff9.tar.gz |
lib/bb: Add BB_SIGNATURE_LOCAL_DIRS_EXCLUDE to speed-up taskhash on directories
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"
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/checksum.py')
-rw-r--r-- | lib/bb/checksum.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bb/checksum.py b/lib/bb/checksum.py index 5bc8a8fcb..677020f49 100644 --- a/lib/bb/checksum.py +++ b/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) |