summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-23 14:24:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-24 17:45:29 +0000
commit7bea963eed8da38f71547210f3e3677e2898ab11 (patch)
treec53dcde21c13a442056e030218bc5c821463f9a7
parenta03c6b912b223227e1f890760176ae55fb030c01 (diff)
downloadpoky-7bea963eed8da38f71547210f3e3677e2898ab11.tar.gz
sanity: Add warning for local hasheqiv server with remote sstate mirrors
We're seeing a lot of users configuring an sstate mirror but not realising that the default hash equivalenve setting will make this ineffective. Add a warning to highlight this to the user for the common case. (From OE-Core rev: ae4eb33b5a6a037348e8f66e3d4f19b58dba8fa2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/sanity.bbclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 92807dc88e..be956fbcd6 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -914,6 +914,11 @@ def check_sanity_everybuild(status, d):
914 mirror_base = urllib.parse.urlparse(mirror[:-1*len('/PATH')]).path 914 mirror_base = urllib.parse.urlparse(mirror[:-1*len('/PATH')]).path
915 check_symlink(mirror_base, d) 915 check_symlink(mirror_base, d)
916 916
917 # Check sstate mirrors aren't being used with a local hash server and no remote
918 hashserv = d.getVar("BB_HASHSERVE")
919 if d.getVar("SSTATE_MIRRORS") and hashserv and hashserv.startswith("unix://") and not d.getVar("BB_HASHSERVE_UPSTREAM"):
920 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.")
921
917 # Check that TMPDIR hasn't changed location since the last time we were run 922 # Check that TMPDIR hasn't changed location since the last time we were run
918 tmpdir = d.getVar('TMPDIR') 923 tmpdir = d.getVar('TMPDIR')
919 checkfile = os.path.join(tmpdir, "saved_tmpdir") 924 checkfile = os.path.join(tmpdir, "saved_tmpdir")