All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: "Aníbal Limón" <anibal.limon@linaro.org>,
	"bitbake-devel@lists.openembedded.org"
	<bitbake-devel@lists.openembedded.org>
Subject: Re: [PATCHv2] lib/bb: Add	BB_SIGNATURE_LOCAL_DIRS_EXCLUDE to speed-up taskhash on directories
Date: Fri, 15 Nov 2019 16:29:42 +0000	[thread overview]
Message-ID: <401cecf1881048e594574ca4d37c446c@XBOX03.axis.com> (raw)
In-Reply-To: <20191115144723.7452-1-anibal.limon@linaro.org>

> -----Original Message-----
> From: bitbake-devel-bounces@lists.openembedded.org <bitbake-devel-
> bounces@lists.openembedded.org> On Behalf Of Aníbal Limón
> Sent: den 15 november 2019 15:47
> To: bitbake-devel@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@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


  reply	other threads:[~2019-11-15 16:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15 14:47 [PATCHv2] lib/bb: Add BB_SIGNATURE_LOCAL_DIRS_EXCLUDE to speed-up taskhash on directories Aníbal Limón
2019-11-15 16:29 ` Peter Kjellerstedt [this message]
2019-11-15 17:12   ` Mark Hatle
2019-11-18 15:22     ` Anibal Limon
2019-12-16 18:55       ` Anibal Limon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=401cecf1881048e594574ca4d37c446c@XBOX03.axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=anibal.limon@linaro.org \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.