[1/2] package: Ensure we track whether PRSERV was active or not

Message ID 20220508123929.159466-1-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit dd660e5c3fb74f7c4b7b8e863f7143066ae22813
Headers show
Series [1/2] package: Ensure we track whether PRSERV was active or not | expand

Commit Message

Richard Purdie May 8, 2022, 12:39 p.m. UTC
Currently the signatures for do_packagedata don't reflect whether PRServ
was active or not. This means that if you have mxiing of PRServ usage and
non PRServ usage against the same sstate cache it can rarely become
corrupted with one referencing the other.

This likely doesn't happen in general but does on the autobuilder as PRServ
is tested. Add in some variables to ensure the binary state of PRServ being
enabled or disabled is tracked (but not the server value). We continue to
assume one PRServ is used per sstate cache.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/package.bbclass | 3 +++
 1 file changed, 3 insertions(+)

Patch

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 44fbc32df6aa..62050a18b8d3 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -662,7 +662,10 @@  def runtime_mapping_rename (varname, pkg, d):
 # Used by do_packagedata (and possibly other routines post do_package)
 #
 
+PRSERV_ACTIVE = "${@bool(d.getVar("PRSERV_HOST"))}"
+PRSERV_ACTIVE[vardepvalue] = "${PRSERV_ACTIVE}"
 package_get_auto_pr[vardepsexclude] = "BB_TASKDEPDATA"
+package_get_auto_pr[vardeps] += "PRSERV_ACTIVE"
 python package_get_auto_pr() {
     import oe.prservice