diff mbox series

[v2] sanity: condition hash equivalence warnings to when it is in use.

Message ID 20260317143326.318575-2-jose.quaresma@foundries.io
State Accepted, archived
Commit e5184a0d2071b025d17e8ba0f55078705619b275
Headers show
Series [v2] sanity: condition hash equivalence warnings to when it is in use. | expand

Commit Message

Jose Quaresma March 17, 2026, 2:33 p.m. UTC
From: Jose Quaresma <jose.quaresma@oss.qualcomm.com>

The warnings about the hash equivalence server are only valid when the signature is
being used, and for that we have to check the BB_SIGNATURE_HANDLER variable.

This fix the warning that is displayed when using the basic signature hash, OEBasicHash.

| WARNING:
| You are using a local hash equivalence server but have configured an sstate mirror.
| This will likely mean no sstate will match from the mirror.
| You may wish to disable the hash equivalence use (BB_HASHSERVE),
| or use a hash equivalence server alongside the sstate mirror.

Signed-off-by: Jose Quaresma <jose.quaresma@oss.qualcomm.com>
---

 v2: add new top conditions for the BB_SIGNATURE_HANDLER and ident the existing one

 meta/classes-global/sanity.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass
index a170c3f5f5..389ad7c917 100644
--- a/meta/classes-global/sanity.bbclass
+++ b/meta/classes-global/sanity.bbclass
@@ -1008,8 +1008,9 @@  def check_sanity_everybuild(status, d):
 
     # Check sstate mirrors aren't being used with a local hash server and no remote
     hashserv = d.getVar("BB_HASHSERVE")
-    if d.getVar("SSTATE_MIRRORS") and hashserv and hashserv.startswith("unix://") and not d.getVar("BB_HASHSERVE_UPSTREAM"):
-        bb.warn("You are using a local hash equivalence server but have configured an sstate mirror. This will likely mean no sstate will match from the mirror. You may wish to disable the hash equivalence use (BB_HASHSERVE), or use a hash equivalence server alongside the sstate mirror.")
+    if d.getVar("BB_SIGNATURE_HANDLER") == "OEEquivHash":
+        if d.getVar("SSTATE_MIRRORS") and hashserv and hashserv.startswith("unix://") and not d.getVar("BB_HASHSERVE_UPSTREAM"):
+            bb.warn("You are using a local hash equivalence server but have configured an sstate mirror. This will likely mean no sstate will match from the mirror. You may wish to disable the hash equivalence use (BB_HASHSERVE), or use a hash equivalence server alongside the sstate mirror.")
 
     # Check that when SSTATE_DIR is shared between builds, hashserve database is not private to a build
     hashserv_proto,_,hashserv_path,_,_,_ = bb.fetch2.decodeurl(hashserv)