Patchwork [2/2] classes/buildhistory: fix task signatures changing

login
register
mail settings
Submitter Paul Eggleton
Date March 3, 2014, 4:56 p.m.
Message ID <6786f46ac3a0eab763e8bea59ef5398b4024c095.1393865774.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/67891/
State New
Headers show

Comments

Paul Eggleton - March 3, 2014, 4:56 p.m.
Fix task signatures for recipes that add to SSTATEPOSTINSTFUNCS changing
when adding and removing INHERIT += "buildhistory" (really this time!)

This relies on the BitBake vardepvalueexclude feature, however it will
not fail without it - signatures will be changed in that case though.

Part of the fix for [YOCTO #5897].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/buildhistory.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index ef4135b..1a0e35d 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -18,8 +18,10 @@  BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
 BUILDHISTORY_PUSH_REPO ?= ""
 
 SSTATEPOSTINSTFUNCS += "buildhistory_emit_pkghistory"
-# We want to avoid influence the signatures of sstate tasks
-SSTATEPOSTINSTFUNCS[vardepvalue] := "${@d.getVar('SSTATEPOSTINSTFUNCS', False).replace(' buildhistory_emit_pkghistory', '')}"
+# We want to avoid influence the signatures of sstate tasks - first the function itself:
+sstate_install[vardepsexclude] += "buildhistory_emit_pkghistory"
+# then the value added to SSTATEPOSTINSTFUNCS:
+SSTATEPOSTINSTFUNCS[vardepvalueexclude] .= "| buildhistory_emit_pkghistory"
 
 #
 # Write out metadata about this package for comparision when writing future packages