summaryrefslogtreecommitdiffstats
path: root/meta/classes/sanity.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* sanity.bbclass: Detect and fail if 'inherit' is used in conf fileGregor Zatko2020-05-241-0/+6
| | | | | | | | | | | | | | | | | | 'inherit' directive may not be used in conf files as it's supposed to be used for the inheritance of classes. Correct form in conf file is INHERIT. This commit adds: - a sanity check to find whether the wrong case exists - fail the build if so - tell user about the difference in directives [YOCTO #5426] (From OE-Core rev: 07bf9b460fe97dec86439302a83bbefa8bac9d70) Signed-off-by: Gregor Zatko <gzatko@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Require gcc 6 or laterRichard Purdie2020-05-021-3/+3
| | | | | | | | | New versions of rpm have issues with the libgomp support in gcc 5.x so raise the minimum to 6 or later. This mainly affects Ubuntu 16.04. (From OE-Core rev: aca2e5816203b54e0955eaa99fc980d010052d5d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Windows: Enable Windows builds under WSLv2 and warn accordinglyAlejandro Hernandez Samaniego2020-04-061-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the architectural changes between Windows Subsystem for Linux v2, and WSL v1 it should now be possible to run bitbake on the several distros offered through the Microsoft Store. WSLv2 is available on Windows 10 build number > 18917 The current build number may be checked by opening a cmd prompt on Windows and running: C:\Users\myuser>ver Microsoft Windows [Version 10.0.19041.113] If a distro has already been installed via the Microsoft Store, then we can check which WSL version its using by opening a Windows Powershell (notice this is a powershell and not a cmd prompt): C:\WINDOWS\system32> wsl -l -v NAME STATE VERSION * Ubuntu Running 2 Debian Stopped 1 In this case it shows two distros installed, Ubuntu running WSLv2 and Debian running WSLv1 To change the version of WSL being used by a certain distro run: C:\WINDOWS\system32> wsl --set-version <Distro> 2 e.g C:\WINDOWS\system32> wsl --set-version Debian 2 For more information on installing WSLv2 please look at: https://docs.microsoft.com/en-us/windows/wsl/wsl2-install There are some caveats related to the way storage is handled by WSLv2 though, and at this point these have to be managed by the user manually, the storage space used by WSL is not reflected immediately and since bitbake heavily uses storage, after several builds this can prove to be a bit of an issue. WSLv2 uses a VHDX file for storage, this issue can be easily avoided by optimizing this file every now and then, this can be done via the following: 1.- Find the location of your VHDX file: - Get the distro app package directory. - Open Windows Powershell as Administrator and run: Get-AppxPackage -Name "*<DISTRO>*" | Select PackageFamilyName e.g.: PS C:\WINDOWS\system32> Get-AppxPackage -Name "*Ubuntu*" | Select PackageFamilyName PackageFamilyName ----------------- CanonicalGroupLimited.UbuntuonWindows_79abcdefgh Replace the PackageFamilyName (and your user) on the following path: C:\Users\<user>\AppData\Local\Packages\<PackageFamilyName>\LocalState\ e.g. ls C:\Users\<user>\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState\ Mode LastWriteTime Length Name -a---- 3/14/2020 9:52 PM 57418973184 ext4.vhdx The VHDX file path is: C:\Users\<user>\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState\ext4.vhdx 2.- Optimize your VHDX file (Also on Powershell): - Make sure WSL is shutdown wsl --shutdown - Optimize it optimize-vhd -Path C:\Users\<user>\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState\ext4.vhdx -Mode full A progress bar should be shown while optimizing the VHDX file. As an example, after building core-image-sato, removing the TMPDIR did not reflect any changes on Windows Explorer for storage space being used, after optimizing the VHDX file, 14 extra GB were shown as free. So, as long as the the user optimizes its storage, the builds should run smoothly. This patch warns the user that is running bitbake under WSLv2, that they should optimize the VHDX file eventually to avoid storage issues. The same check previoulsy used for WSLv1 works for WSLv2, checking for the kernel version: WSLv1: Linux version 4.4.0-19041-Microsoft (Microsoft@Microsoft.com) WSLv2: Linux version 4.19.84-microsoft-standard (oe-user@oe-host) Builds have been tested under Ubuntu and Debian distros offered and installed through the Microsoft Store, and other distros should be able to run builds just as fine. Performance wise, using the same hardware, and same configuration a comparison between builds using native Linux vs WSLv2 for the following targets has been performed: - core-image-minimal - core-image-sato - core-image-sato-sdk - meta-toolchain No real evidence of any performance changes could be found, with WSLv2 builds running even faster in some cases. Running a recently built image can be done just as smoothly, if using "nographic" as argument for runqemu, or if its a graphical image, installing an X server and running runqemu runs just as fine. Happy bitbaking. (From OE-Core rev: c42cec0c1c57c4e67dc7cdb07c5e4aba14a847d3) Signed-off-by: Alejandro Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Alejandro Hernandez Samaniego <alhe@linux.microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: echo current SDK_VENDOR if it is invalidPaul Gortmaker2020-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | It can be frustrating if this sanity check triggers, but you don't know why; you haven't explicitly set any SDK vars, or similar. At least echo out the offending value, so the end user has a bit more information to go on. Before: SDK_VENDOR should be of the form '-foosdk' with a single dash After: SDK_VENDOR should be of the form '-foosdk' with a single dash; found '-overc-sdk' Cc: Ross Burton <ross.burton@intel.com> (From OE-Core rev: e238fa177bd72bc5d165fbe4f640132267a1d3fd) Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Require gcc 5.0 minimum versionRichard Purdie2020-04-051-3/+3
| | | | | | | | | | | | After polling various develoeprs, its clear that many layers are struggling with gcc 4.8 and its better for the project to adopt 5.0 as a minimum version at this point in time. We should have technology like buildtools-extended-tarball available to ensure things still work on Centos 7 and Debian 8. (From OE-Core rev: abc741af16311cb473b7e3185ae34265b243d804) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: add test for gcc < 4.8Tim Orling2020-04-011-1/+20
| | | | | | | | | | | | | | | | | | | | | | | It is known that old versions of gcc prior to 4.8 causes builds to fail. Add a test for BUILD_CC == 'gcc' and gcc < 4.8 and recommend using scripts/install-buildtools or user built buildtools-extended-tarball. Use the new get_host_compiler_version function from lib/oe/utils.py NOTE: another solution is to install devtoolset-6+ from scl [1], but this is a rather large install (> 1 Gb) and fairly invasive. [1] https://www.softwarecollections.org/en/scls/rhscl/devtoolset-6/ Adding this code means we can increase the minimum version easily in the future too (which will soon be needed). RP: Change minimum version from 5.0 to 4.8 for initial patch (From OE-Core rev: 3bb3b9cbad82b2f09386153226d1d4e769b7347b) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: recommend using install-buildtoolsTim Orling2020-04-011-3/+1
| | | | | | | | | | | | For old tar version (< 1.28), recommend using scripts/install-buildtools Drop check for tar version 1.24. Dubious extra value. (From OE-Core rev: 7a66434cf11b7f051699b774e4fccd6738351368) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf/sanity: Drop makeinfo as being required on buildhostRichard Purdie2020-02-031-1/+1
| | | | | | | | | | | | | | | | | This is a long standing 'odd' dependency which we've meant to resolve. We shouldn't need it and it introduces reproducability issues. We already have texinfo-dummy-native and texinfo-native which can provide it but the work to remove the hosttool was never completed. After cleaning up texinfo.bbclass, this can now be removed with minimal impact on build time. [YOCTO #13753] (From OE-Core rev: 0c58c479af151969dfb84d8763696da657f7248d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: Move sanity_info from conf to cachePeter Kjellerstedt2020-01-101-1/+1
| | | | | | | | | | | | | | Since this file is written during recipe parsing, having it in the ${BUILDDIR}/conf directory, which is covered by an inotify watcher, will trigger a re-parse the next time bitbake is run and the resident bitbake server is enabled. This causes the sanity_info file to be updated again, which triggers a new parse the next time bitbake is run ad infinitum. Moving it to ${BUILDDIR}/cache should avoid this. (From OE-Core rev: f98103b548aa7dba6b1be6c8e02ef41858a8e85c) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Add check for tar older than 1.28Richard Purdie2019-11-221-1/+4
| | | | | | | | | | Older versions break opkg-build when reproducible builds are enabled. Rather than trying to be selective based on which features are enabled, lets just make this a minimum version. (From OE-Core rev: 0fdc43da005c3c6102cf07383ad6f451d2203fa5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: check for more bits of PythonRoss Burton2019-11-041-5/+7
| | | | | | | (From OE-Core rev: d3dfaf8acdb072fb26346d2568c47d8742ea4fed) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: check the format of SDK_VENDORRoss Burton2019-10-191-0/+5
| | | | | | | | | | | | | | | If SDK_VENDOR isn't formatted as -foosdk and is instead for example -foo-sdk then the triple that are constructed are not in fact triples, which results in mysterious compile errors. Check in sanity.bbclass so this failure is detected early. [ YOCTO #13573 ] (From OE-Core rev: b0efd8d4d0dbc30e6505b42f5603f18fa764d732) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: update for new bb.build.exec_func() behaviourRoss Burton2019-08-061-1/+1
| | | | | | | | | | | The pythonexception argument is no more, and passing True is the new behavior. [ YOCTO #13468 ] (From OE-Core rev: b7a34d2b8d684e5b98f5c286de67dc1b5d8df853) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: check_perl_modules bug fixZheng Ruoqin2019-04-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Python3 TypeError error in check_perl_modules: Executing bitbake, the following error message will be throwed: File ".../poky/meta/classes/sanity.bbclass", line 979, in check_sanity_eventhandler check_sanity(sanity_data) File ".../poky/meta/classes/sanity.bbclass", line 943, in check_sanity check_sanity_version_change(status, sanity_data) File ".../poky/meta/classes/sanity.bbclass", line 637, in check_sanity_version_change status.addresult(check_perl_modules(d)) File ".../poky/meta/classes/sanity.bbclass", line 563, in check_perl_modules errresult += e.output TypeError: must be str, not bytes So here, transfer e.output from bytes to str. (From OE-Core rev: 2c6fff3fe315357d65d082679856615afc367d90) Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: clarify error message if TMPDIR movesRoss Burton2019-04-091-1/+1
| | | | | | | | | | | | | If TMPDIR is moved the error message says "move it back or rebuild" but the obvious rebuild method of running 'bitbake [recipe]] -cclean' fails with the same error. Make it clear what we mean by adding "delete and". (From OE-Core rev: 36805a628f8208ff6d7fba9955c5fb1ed6396395) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* class/sanity: strip the output of get_filesystem_id()Steven Hung (洪于玉)2019-03-181-1/+1
| | | | | | | | | | A previous commit 2f44b9b replace oe.utils.getstatusoutput() to subprocess.check_output(). check_output() don't remove a trailling newline. Add strip() (From OE-Core rev: 172c3e85c601a61f3c668f83b75f4c1eb31dbd4d) Signed-off-by: Steven Hung (洪于玉) <Steven.Hung@mediatek.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Add check for WSLRichard Purdie2018-11-161-0/+11
| | | | | | | | | Users are starting to expect OE to work under WSL which it doesn't. Add a warning to tell them about this up front and manage expectations. (From OE-Core rev: 62fe04c2451f612b9ee5eba469c7724b63484499) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/sanity: Clean up getstatusoutput usageJoshua Watt2018-08-081-29/+38
| | | | | | | | | | | Replace usage of oe.utils.getstatusoutput() with direct subprocess calls. (From OE-Core rev: 2f44b9b5babf8c95340b141917c1142081f1e594) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: quote path passed to stat in get_filesystem_id()Andre McCurdy2018-03-281-1/+1
| | | | | | | | | | | | Although get_filesystem_id() is a private API and never gets passed a path containing spaces or other special characters, etc, quote the path anyway for consistency. (From OE-Core rev: 1a9878cdb1cdb807c47e852b780c8ef9b93a214e) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: modified error messageJuro Bystricky2018-02-061-1/+1
| | | | | | | | (From OE-Core rev: ed41167521ccae14952e500d7432cb776636f4e9) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/sanity: check we don't have an ancient GNU patchRoss Burton2017-12-101-0/+17
| | | | | | | | | | We depend on the host GNU patch, but patch < 2.7 can't handle git-style patches. This results in patches that fail to apply, or worse apply incorrectly. (From OE-Core rev: ddda57ab1dee989dce8754350471807c916a6f47) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: getstatusoutput returns an int, not a stringRoss Burton2017-12-101-3/+3
| | | | | | | | | | | This code is an error path so nobody noticed that oe.utils.getstatusoutput() is just a wrapper around subprocess.getstatusoutput() which returns an (int, string) pair not (string, string). (From OE-Core rev: 33bf6e05af0a68da32f0484460b1de5f7f4eea98) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: check that path variables don't use ~Ross Burton2017-09-221-0/+5
| | | | | | | | | | The core path variables (TMPDIR, DL_DIR, SSTATE_DIR) don't use tilde expansion but if the user does then the errors are very mysterious, so check on startup. (From OE-Core rev: 2fb74abbe07b6b82a715ac0fe16449bd8420110e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: correct Python version sanity checkRoss Burton2017-09-221-3/+3
| | | | | | | | | We now require Python 3.4, not 2.7. (From OE-Core rev: b12d99dbfbee8c4b3680f453f833410950238bb9) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/sanity: check for case-sensitive file systemsRoss Burton2017-07-171-0/+12
| | | | | | | | | | | | | | | | | | Case-insensitive file systems fail during builds in very mysterious ways, such as mpfr: ERROR: patch_do_patch: Not a directory The problem here being that mpfr has a PATCHES file, so when we try to copy the patches into ${S}/patches/ it fails. We can't and won't support case-insensitive file systems so add a sanity check to abort the build if one is found. (From OE-Core rev: 20ce04fb64f559e64490d53678fa00644a92894a) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: fix AttributeError in mirror format checksMikko Ylinen2017-07-061-1/+1
| | | | | | | | | | | | | | mirrors is a list after split() and results in: AttributeError: 'list' object has no attribute 'strip' when the 'mirror values are pairs' check fails. (From OE-Core rev: 2b7232f2913cc3c8463f136bad7dd06b690c5141) Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: remove obsolete gcc 4.5 checkRoss Burton2017-07-061-49/+1
| | | | | | | | | | As gcc 4.5 is very old now (released in 2010, gcc 4.6 released in 2011) this check can be removed now. (From OE-Core rev: 78ea1af6bc5d314781be4a3c2d28347312238115) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: remove ASSUME_PROVIDED checks that can't succeedRoss Burton2017-07-061-8/+0
| | | | | | | | | | | | qemu-arm and libsdl-native are not in HOSTTOOLS, so there's no point in checking that they're on PATH. Also qemu uses pkg-config to find SDL, so libsdl-native isn't required. (From OE-Core rev: a8d8b0d9e1c2346d5a314ed0a7bf5be66044a51d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: explain where TMPDIR is if we're telling the user to delete itRoss Burton2017-04-051-1/+1
| | | | | | | (From OE-Core rev: c03de901213846d7c8cc2a12a97034273aa904c3) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Drop obsolete TMPDIR ABI conversionsRichard Purdie2017-03-311-42/+1
| | | | | | | | | | | When we get to version 12 we have a hard break as we can't convert to newer versions. There is no point in running the old conversions on an old tmpdir only to hit that block. Remove all the old conversions to avoid that and make things clearer. (From OE-Core rev: 163b27bdfe323b648929240375aaf251e8d5edf4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: modify check for shellJuro Bystricky2017-03-161-1/+3
| | | | | | | | | | | | | | | | | Due to the recently implemented update-alternatives for bash binary, sanity checker may end up with a (false-positive) error such as: Error, /bin/sh links to /bin/bash.bash, must be dash or bash This patch modifies the test: presence of "/bash" or "/dash" in shell binary name results in pass. [YOCTO#11108] (From OE-Core rev: ef51746cdd12e6b08109e9bd90a0a465c3f9f93c) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: allow s3 protocol when sanity checking MIRRORS, etcAndre McCurdy2017-03-101-1/+1
| | | | | | | | | | | | Bitbake now supports an Amazon AWS S3 fetcher: http://git.openembedded.org/bitbake/commit/?id=6fe07ed25457dd7952b60f4b2153d56b15d5eea6 (From OE-Core rev: 5cc3592afc72bae8dd12d3d8ff15bb7418baaea3) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Allow whitespace only mirror entriesRichard Purdie2017-03-031-11/+9
| | | | | | | | | | Forcing the use of "\n" in mirror variables is pointless, we can just require that there are pairs of values. With the bitbake restriction relaxed, we can relax the sanity check too. (From OE-Core rev: 7313b10e242da9225211ca9fd53d14a121c5fa42) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: Add which to SANITY_REQUIRED_UTILITIES.Philip Balister2017-02-151-1/+1
| | | | | | | | | | | | | | Using docker with the Fedora 23 container exposed an issue with the rpm-native configure step. If which is not present the configure script fork bombs. After much pain, I tracked this to which not being present in the default container. Add a check for which so others do not have to have this experience. (From OE-Core rev: 096c07900250db157bb0c38785b9d8efc6301cab) Signed-off-by: Philip Balister <philip@balister.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Drop now unneeded update_data callsRichard Purdie2017-02-151-1/+0
| | | | | | | | | | Now that the datastore works dynamically we don't need the update_data calls so we can just remove them. They're not actually done anything at all for a while. (From OE-Core rev: 8de0c5d3bd01919e2bf0394f9c485936d6098cec) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity/abi-version: Force a clean TMPDIR after recipe specific sysroot changesRichard Purdie2017-01-231-0/+2
| | | | | | | | | | | | | | With the recipe specific sysroots, we need a clean tmpdir, else pseudo-native, openssl-native, subversion-native and serf-native need to be manually cleaned. After these there are probably more places where software doesn't rebuild correctly even if we pass in new parameters to it. The simplest solution is to force people to start from a clean TMPDIR since everything would rebuild anyway. (From OE-Core rev: da58e27a0f8fc8200f1953f05888834abd79c9f8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: Improved error messageJuro Bystricky2017-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | When a non-existing MACHINE is specified, sanity check issues the following message: Please set a valid MACHINE in your local.conf or environment However, MACHINE can also be set in multiconfig .conf file(s). Hence we may have several different MACHINE settings within one (multiconfig) build, so the present error message is fairly ambiguous. This patch remedies this by explicitly naming the offending MACHINE and by amending the list of places where this erroneous MACHINE definition could have originated. MACHINE=xyz is invalid. Please set a valid MACHINE in your local.conf, environment or other configuration file. [YOCTO#10810] (From OE-Core rev: a7cb408dd784178197687a2129e936620bf6a0d3) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/scripts: Various getVar/getVarFlag expansion parameter fixesRichard Purdie2017-01-091-2/+2
| | | | | | | | | | | | | | | | | There were a few straggling expansion parameter removals left for getVar/getVarFlag where the odd whitespace meant they were missed on previous passes. There were also some plain broken ussages such as: d.getVar('ALTERNATIVE_TARGET', old_name, True) path = d.getVar('PATH', d, True) d.getVar('IMAGE_ROOTFS', 'True') which I've corrected (they happend to work by luck). (From OE-Core rev: 688f7a64917a5ce5cbe12f8e5da4d47e265d240f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar callsJoshua Lock2016-12-161-54/+54
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: fix check_connectivity() for BB_NO_NETWORK = "0"Robert Yang2016-11-231-5/+9
| | | | | | | | | | | | | | | The old code: network_enabled = not d.getVar('BB_NO_NETWORK', True) It is True only when BB_NO_NETWORK is not set (None), but BB_NO_NETWORK = "0" should also be True while "1" means no network, "0" means need network in a normal case. (From OE-Core rev: 3d8db6cb992f96023a0486f64fe6b0f1ead04184) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass:check_connectivity(): print more error messagesRobert Yang2016-11-231-1/+4
| | | | | | | | | | | | | | | | This can help fix the problem when the error happens. Now the error message is: Fetcher failure for URL: 'https://www.example.com/'. URL https://www.example.com/ doesn't work. Please ensure your host's network is configured correctly, or set BB_NO_NETWORK = "1" to disable network access if all required sources are on local disk. (From OE-Core rev: 0b31a03c59efea3a8742762772e39dcbd6f8ed25) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: fix logging of an errorMarkus Lehtonen2016-11-151-1/+1
| | | | | | | | | | | Fixes a crash in exception handler. All bb logging functions need an string instances as arguments. (From OE-Core rev: a675b2c89e477af088faee9b3be96eae19a85f0b) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: split out config re-parse checkMarkus Lehtonen2016-09-161-15/+12
| | | | | | | | | | | | | | | | | Split out the functionality doing configuration re-parse check into a separate event handler that is hooked into ConfigParsed event. This will make config re-parsing actually work. Re-parsing in bitbake is triggered by setting BB_INVALIDCONF whose value is checked after configuration has been parsed (after ConfigParsed event). However, previously BB_INVALIDCONF was set in SanityCheck event handler which caused re-parsing never to happen. [YOCTO #10188] (From OE-Core rev: 8fda70bb74f7c63d393d5424436d034d2cc6c05e) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: fix hardcoded references to gccJérémy Rosen2016-09-141-7/+7
| | | | | | | | (From OE-Core rev: 89f55bf8e9d633cfb508a0885a462afb561c7cee) Signed-off-by: Jérémy Rosen <jeremy.rosen@smile.fr> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: Ensure we expand BUILD_PREFIXRichard Purdie2016-08-201-3/+3
| | | | | | | | | | This likely used to work when we expanded python functions and broke when we stopped. Since it defaults to "", it never caused an issue but is incorrect usage so fix it. (From OE-Core rev: bfb395fdea642b306f110b4b8f1046f1992c622c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: Only verify /bin/sh link if it's a linkOlof Johansson2016-08-171-4/+5
| | | | | | | | | | | If /bin/sh is a regular file (and not a symlink), we assume it's a reasonable shell and allow it. (From OE-Core rev: eaa0dc21a5f058a39bd7867bd3cafdb3407abe36) Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Switch urlparse to urllib.parseJeremy Puhlman2016-06-021-3/+3
| | | | | | | | | urlparse is replaced with urllib.parse functionality in python3 (From OE-Core rev: ecfcc5dad20943b762a741546732a6c447265251) Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Convert to use python3 octal syntaxRichard Purdie2016-06-021-2/+2
| | | | | | | | The syntax for octal values changed in python3, adapt to it. (From OE-Core rev: 737a095fcde773a36e0fee1f27b74aaa88062386) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: Drop setting C localeRichard Purdie2016-06-011-1/+0
| | | | | | | | | | We really want the en_US locale as per the configuration and previous patches. Don't set it back to C as things will break under python3. (From OE-Core rev: 42af63f326b03b32019c8b808b7ba07027f209b8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity: check that the en_US.UTF-8 locale existsRoss Burton2016-05-301-0/+13
| | | | | | | (From OE-Core rev: 55e335d93fe74da3cce220f34bfedcfc47132806) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>