summaryrefslogtreecommitdiffstats
path: root/meta/classes/sanity.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass36
1 files changed, 26 insertions, 10 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 866d066288..33e5e5952f 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -392,9 +392,12 @@ def check_connectivity(d):
392 msg = data.getVar('CONNECTIVITY_CHECK_MSG') or "" 392 msg = data.getVar('CONNECTIVITY_CHECK_MSG') or ""
393 if len(msg) == 0: 393 if len(msg) == 0:
394 msg = "%s.\n" % err 394 msg = "%s.\n" % err
395 msg += " Please ensure your host's network is configured correctly,\n" 395 msg += " Please ensure your host's network is configured correctly.\n"
396 msg += " or set BB_NO_NETWORK = \"1\" to disable network access if\n" 396 msg += " If your ISP or network is blocking the above URL,\n"
397 msg += " all required sources are on local disk.\n" 397 msg += " try with another domain name, for example by setting:\n"
398 msg += " CONNECTIVITY_CHECK_URIS = \"https://www.example.com/\""
399 msg += " You could also set BB_NO_NETWORK = \"1\" to disable network\n"
400 msg += " access if all required sources are on local disk.\n"
398 retval = msg 401 retval = msg
399 402
400 return retval 403 return retval
@@ -558,6 +561,14 @@ def check_tar_version(sanity_data):
558 version = result.split()[3] 561 version = result.split()[3]
559 if LooseVersion(version) < LooseVersion("1.28"): 562 if LooseVersion(version) < LooseVersion("1.28"):
560 return "Your version of tar is older than 1.28 and does not have the support needed to enable reproducible builds. Please install a newer version of tar (you could use the project's buildtools-tarball from our last release or use scripts/install-buildtools).\n" 563 return "Your version of tar is older than 1.28 and does not have the support needed to enable reproducible builds. Please install a newer version of tar (you could use the project's buildtools-tarball from our last release or use scripts/install-buildtools).\n"
564
565 try:
566 result = subprocess.check_output(["tar", "--help"], stderr=subprocess.STDOUT).decode('utf-8')
567 if "--xattrs" not in result:
568 return "Your tar doesn't support --xattrs, please use GNU tar.\n"
569 except subprocess.CalledProcessError as e:
570 return "Unable to execute tar --help, exit code %d\n%s\n" % (e.returncode, e.output)
571
561 return None 572 return None
562 573
563# We use git parameters and functionality only found in 1.7.8 or later 574# We use git parameters and functionality only found in 1.7.8 or later
@@ -882,13 +893,18 @@ def check_sanity_everybuild(status, d):
882 except: 893 except:
883 pass 894 pass
884 895
885 oeroot = d.getVar('COREBASE') 896 for checkdir in ['COREBASE', 'TMPDIR']:
886 if oeroot.find('+') != -1: 897 val = d.getVar(checkdir)
887 status.addresult("Error, you have an invalid character (+) in your COREBASE directory path. Please move the installation to a directory which doesn't include any + characters.") 898 if val.find('..') != -1:
888 if oeroot.find('@') != -1: 899 status.addresult("Error, you have '..' in your %s directory path. Please ensure the variable contains an absolute path as this can break some recipe builds in obtuse ways." % checkdir)
889 status.addresult("Error, you have an invalid character (@) in your COREBASE directory path. Please move the installation to a directory which doesn't include any @ characters.") 900 if val.find('+') != -1:
890 if oeroot.find(' ') != -1: 901 status.addresult("Error, you have an invalid character (+) in your %s directory path. Please move the installation to a directory which doesn't include any + characters." % checkdir)
891 status.addresult("Error, you have a space in your COREBASE directory path. Please move the installation to a directory which doesn't include a space since autotools doesn't support this.") 902 if val.find('@') != -1:
903 status.addresult("Error, you have an invalid character (@) in your %s directory path. Please move the installation to a directory which doesn't include any @ characters." % checkdir)
904 if val.find(' ') != -1:
905 status.addresult("Error, you have a space in your %s directory path. Please move the installation to a directory which doesn't include a space since autotools doesn't support this." % checkdir)
906 if val.find('%') != -1:
907 status.addresult("Error, you have an invalid character (%) in your %s directory path which causes problems with python string formatting. Please move the installation to a directory which doesn't include any % characters." % checkdir)
892 908
893 # Check the format of MIRRORS, PREMIRRORS and SSTATE_MIRRORS 909 # Check the format of MIRRORS, PREMIRRORS and SSTATE_MIRRORS
894 import re 910 import re