[bitbake-devel] [PATCHv2] lib/bb: Add BB_SIGNATURE_LOCAL_DIRS_EXCLUDE to speed-up taskhash on directories
Peter Kjellerstedt
peter.kjellerstedt at axis.com
Fri Nov 15 16:29:42 UTC 2019
> -----Original Message-----
> From: bitbake-devel-bounces at lists.openembedded.org <bitbake-devel-
> bounces at lists.openembedded.org> On Behalf Of Aníbal Limón
> Sent: den 15 november 2019 15:47
> To: bitbake-devel at lists.openembedded.org
> Subject: [bitbake-devel] [PATCHv2] 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 at linaro.org>
> ---
> lib/bb/checksum.py | 5 +++--
> lib/bb/fetch2/__init__.py | 4 ++--
> lib/bb/siggen.py | 5 +++--
> 3 files changed, 8 insertions(+), 6 deletions(-)
[cut]
> --- a/lib/bb/siggen.py
> +++ b/lib/bb/siggen.py
> @@ -123,6 +123,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
>
> self.unihash_cache = bb.cache.SimpleCache("1")
> self.unitaskhashes = self.unihash_cache.init_cache(data, "bb_unihashes.dat", {})
> + self.localdirsexclude = (data.getVar("BB_SIGNATURE_LOCAL_DIRS_EXCLUDE") or "CVS .bzr .git .hg .osc .p4 .repo .svn").split()
I don't like this construct, because if I do:
BB_SIGNATURE_LOCAL_DIRS_EXCLUDE_append = " some_dir"
it means that all of a sudden the SCM directories listed above will no
longer be excluded since BB_SIGNATURE_LOCAL_DIRS_EXCLUDE will now be
defined, but only contain " some_dir". Isn't it better to add:
BB_SIGNATURE_LOCAL_DIRS_EXCLUDE ??= "CVS .bzr .git .hg .osc .p4 .repo .svn"
somewhere in OE-Core (and it can then also have a suitable
BB_SIGNATURE_LOCAL_DIRS_EXCLUDE[doc], though it seems BB_-variables
are only documented in meta/conf/documentation.conf)?
Alternatively, to keep the list above within bitbake, make it two
variables, one for the list of directories above that is not really
intended to be modified, and one for additional directories (which
should still be documented in meta/conf/documentation.conf).
//Peter
More information about the bitbake-devel
mailing list