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
> ---
> 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_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
--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core