[OE-core] [PATCH 02/23] buildhistory.bbclass: add BUILDHISTORY_FORCE_UPDATE option
Mikko.Rapeli at bmw.de
Mikko.Rapeli at bmw.de
Wed Aug 2 07:41:34 UTC 2017
On Thu, Jul 20, 2017 at 04:22:50PM +0300, Mikko Rapeli wrote:
> Setting BUILDHISTORY_FORCE_UPDATE = "1" in local.conf forces buildhistory
> updates and recipe rebuilds also when only buildhistory.bbclass changed.
>
> This is handy when using sstate cache and modifying buildhistory to include
> new data like recipe and package LICENSE fields.
>
> By default new buildhistory data is updated when recipes are rebuild and
> new fields like LICENSE are not deployed immediately.
Are there some problems with this approach?
I did not find other ways to force updates of buildhistory data without
writing custom functions to update LICENSE and CVE_PRODUCT (which I care about
now) for every build. If there was a way to invalidate the full sstate
cache then that would work too, but I doubt a simple PE update somewhere would
do it.
-Mikko
> Signed-off-by: Mikko Rapeli <mikko.rapeli at bmw.de>
> ---
> meta/classes/buildhistory.bbclass | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
> index cc3b144..bc3145e 100644
> --- a/meta/classes/buildhistory.bbclass
> +++ b/meta/classes/buildhistory.bbclass
> @@ -42,10 +42,11 @@ BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
> BUILDHISTORY_PUSH_REPO ?= ""
>
> SSTATEPOSTINSTFUNCS_append = " buildhistory_emit_pkghistory"
> -# We want to avoid influencing the signatures of sstate tasks - first the function itself:
> -sstate_install[vardepsexclude] += "buildhistory_emit_pkghistory"
> +# If BUILDHISTORY_FORCE_UPDATE is not set, we want to avoid influencing the
> +# signatures of sstate tasks - first the function itself:
> +sstate_install[vardepsexclude] += "${@'' if d.getVar('BUILDHISTORY_FORCE_UPDATE', True) == '1' else 'buildhistory_emit_pkghistory'}"
> # then the value added to SSTATEPOSTINSTFUNCS:
> -SSTATEPOSTINSTFUNCS[vardepvalueexclude] .= "| buildhistory_emit_pkghistory"
> +SSTATEPOSTINSTFUNCS[vardepvalueexclude] .= "${@'' if d.getVar('BUILDHISTORY_FORCE_UPDATE', True) == '1' else '| buildhistory_emit_pkghistory'"
>
> # Similarly for our function that gets the output signatures
> SSTATEPOSTUNPACKFUNCS_append = " buildhistory_emit_outputsigs"
> --
> 1.9.1
More information about the Openembedded-core
mailing list