Lines Matching +full:data +full:- +full:lines

13         lines = f.readlines()
14 return lines
16 def sanity_conf_find_line(pattern, lines):
19 for index, line in enumerate(lines)
22 def sanity_conf_update(fn, lines, version_var_name, new_version):
23 index, line = sanity_conf_find_line(r"^%s" % version_var_name, lines)
24 lines[index] = '%s = "%d"\n' % (version_var_name, new_version)
26 f.write(''.join(lines))
96 lines = []
102 lines = sanity_conf_read(bblayers_fn)
106 index, bbpath_line = sanity_conf_find_line('BBPATH', lines)
109 if start != -1 and (len(bbpath_line) != (start + 1)):
111 lines[index] = (bbpath_line[:start + 1] +
115 lines[index] = (bbpath_line[:start + 1] +
120 index, bbfiles_line = sanity_conf_find_line('BBFILES', lines)
122 lines.insert(index, 'BBPATH = "' + topdir_var + '"\n')
127 sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf)
134 sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf)
141 # Handle rename of meta-yocto -> meta-poky
142 # This marks the start of separate version numbers but code is needed in OE-Core
146 if 'meta-yocto' in layers:
149 index, meta_yocto_line = sanity_conf_find_line(r'.*meta-yocto[\'"\s\n]', lines)
151 lines[index] = meta_yocto_line.replace('meta-yocto', 'meta-poky')
157 index, meta_yocto_line = sanity_conf_find_line('LCONF_VERSION.*\n', lines)
159 lines[index] = 'POKY_BBLAYERS_CONF_VERSION = "1"\n'
163 f.write(''.join(lines))
167 sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf)
182 bb.fatal(""" OE-core's config sanity checker detected a potential misconfiguration.
189 def check_toolchain_tune(data, tune, multilib):
193 localdata = bb.data.createCopy(data)
196 overrides = localdata.getVar("OVERRIDES", False) + ":virtclass-multilib-" + multilib
198 bb.debug(2, "Sanity-checking tuning '%s' (%s) features:" % (tune, multilib))
199 features = (localdata.getVar("TUNE_FEATURES:tune-%s" % tune) or "").split()
222 def check_toolchain(data):
224 deftune = data.getVar("DEFAULTTUNE")
225 tune_errors = check_toolchain_tune(data, deftune, 'default')
229 multilibs = (data.getVar("MULTILIB_VARIANTS") or "").split()
230 global_multilibs = (data.getVar("MULTILIB_GLOBAL_VARIANTS") or "").split()
242 tune = data.getVar("DEFAULTTUNE:virtclass-multilib-%s" % lib)
250 tune_errors = check_toolchain_tune(data, tune, lib)
258 def check_conf_exists(fn, data):
260 fn = data.expand(fn)
261 vbbpath = data.getVar("BBPATH", False)
265 currname = os.path.join(data.expand(p), fn)
299 return subprocess.check_output(["stat", "-f", "-c", "%t", path]).decode('utf-8').strip()
311 # Check that the path is on a case-sensitive file system
316 return "The %s (%s) can't be on a case-insensitive file system.\n" % (name, path)
320 def check_symlink(lnk, data):
322 raise_sanity_error("%s is a broken symlink." % lnk, data)
340 # Take a copy of the data store and unset MIRRORS and PREMIRRORS
341 data = bb.data.createCopy(d)
342 data.delVar('PREMIRRORS')
343 data.delVar('MIRRORS')
345 fetcher = bb.fetch2.Fetch(test_uris, data)
350 msg = data.getVar('CONNECTIVITY_CHECK_MSG') or ""
421 # Patch before 2.7 can't handle all the features in git-style diffs. Some
427 … result = subprocess.check_output(["patch", "--version"], stderr=subprocess.STDOUT).decode('utf-8')
428 version = re.search(r"[0-9.]+", result.splitlines()[0]).group()
434 return "Unable to execute patch --version, exit code %d:\n%s\n" % (e.returncode, e.output)
441 … result = subprocess.check_output(['make', '--version'], stderr=subprocess.STDOUT).decode('utf-8')
443 return "Unable to execute make --version, exit code %d\n%s\n" % (e.returncode, e.output)
452 …known to have issues on Centos/OpenSUSE and other non-Ubuntu systems. Please use a buildtools-make
461 # https://docs.microsoft.com/en-us/windows/wsl/wsl2-install
474 # This can be fixed on CentOS-7 with devtoolset-6+
475 # https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6/
477 # A less invasive fix is with scripts/install-buildtools (or with user
478 # built buildtools-extended-tarball)
486 …r version of gcc (you could use the project's buildtools-extended-tarball or use scripts/install-b…
491 # Version 1.28 is needed so opkg-build works correctly when reproducibile builds are enabled
495 … result = subprocess.check_output(["tar", "--version"], stderr=subprocess.STDOUT).decode('utf-8')
497 return "Unable to execute tar --version, exit code %d\n%s\n" % (e.returncode, e.output)
500 …on of tar (you could use the project's buildtools-tarball from our last release or use scripts/ins…
503 … result = subprocess.check_output(["tar", "--help"], stderr=subprocess.STDOUT).decode('utf-8')
504 if "--xattrs" not in result:
505 return "Your tar doesn't support --xattrs, please use GNU tar.\n"
507 return "Unable to execute tar --help, exit code %d\n%s\n" % (e.returncode, e.output)
517 … result = subprocess.check_output(["git", "--version"], stderr=subprocess.DEVNULL).decode('utf-8')
519 return "Unable to execute git --version, exit code %d\n%s\n" % (e.returncode, e.output)
529 modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper" )
533 subprocess.check_output(["perl", "-e", "use %s" % m])
555 indexes = glob.glob(d.expand("${SSTATE_MANIFESTS}/index-${BUILD_ARCH}_*"))
558 lines = f.readlines()
559 for l in reversed(lines):
600 def check_sanity_sstate_dir_change(sstate_dir, data):
622 # minimal installations: glib-2.0-natives requries # xml.parsers.expat and icu
661 if "diffstat-native" not in assume_provided:
691 # Some third-party software apparently relies on chmod etc. being suid root (!!)
713 …f os.path.exists('%s/libc.so.6' % lib32path) and not os.path.exists('/usr/include/gnu/stubs-32.h'):
714 …status.addresult("You have a 32-bit libc, but no 32-bit headers. You must install the 32-bit libc…
736 # Check for case-insensitive file systems (such as Linux in Docker on
742 Currently bitbake switches locale to en_US.UTF-8 so check that this locale actually exists.
746 locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
748 raise_sanity_error("Your system needs to support the en_US.UTF-8 locale.", d)
792 # Check that these variables don't use tilde-expansion as we don't do that
822 if not check_conf_exists("conf/machine-sdk/${SDKMACHINE}.conf", d):
825 …status.addresult('SDKMACHINE is set, but SDK_ARCH has not been changed as a result - SDKMACHINE ma…
827 # If SDK_VENDOR looks like "-my-sdk" then the triples are badly formed so fail early
829 if not (sdkvendor.startswith("-") and sdkvendor.count("-") == 1):
830 …status.addresult("SDK_VENDOR should be of the form '-foosdk' with a single dash; found '%s'\n" % s…
840 # This path is no longer user-readable in modern (very recent) Linux
854 if val.find('..') != -1:
856 if val.find('+') != -1:
858 if val.find('@') != -1:
860 if val.find(' ') != -1:
862 if val.find('%') != -1:
905 mirror_base = urllib.parse.urlparse(mirror[:-1*len('/PATH')]).path
936 # Due to update-alternatives, the shell name may take various
1005 sanity_check_conffiles(e.data)
1012 sanity_data = bb.data.createCopy(e.data)
1016 bb.event.fire(bb.event.SanityCheckPassed(), e.data)
1018 sanity_data = bb.data.createCopy(e.data)
1021 …t.NetworkTestFailed() if check_connectivity(sanity_data) else bb.event.NetworkTestPassed(), e.data)