summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* base.bbclass: Make .jar file depend on unzip-nativeRicardo Ribalda Delgado2017-07-211-1/+1
| | | | | | | | | | | | | | | | | Unzip is required for jar files. Without this patch: ERROR: junit4-4.3.1-r0 do_unpack: Unpack failure for URL: 'http://downloads.sourceforge.net/junit/junit-4.3.1-src.jar'. Unpack command PATH="/var/lib/jenkins/workspace/qt5122-dyspro/build/tmp/sysroots-uninative/x86_64-linux/usr/bin ......." unzip -q -o '/var/lib/yocto/downloads/junit-4.3.1-src.jar' failed with return value 127 Suggested-by: Ross Burton <ross.burton@intel.com> (From OE-Core rev: 96665f8b204b0f0ba571bb6634203aada5983f8a) Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/base: set do_unpack dependencies for rpm filesPaul Eggleton2017-07-211-2/+2
| | | | | | | | | | | | | If we're unpacking any rpm (not just .src.rpm) then we'll need to call rpm2cpio.sh. As of OE-Core rev a7da1aade118d1ccf1b286f82556cd9f706bd2a4 that script no longer uses file-native, but there is a chance that the rpm file will be compressed internally using xz (for example, rpms from Fedora) and therefore the script will need xzcat provided xz-native. (From OE-Core rev: 2f31f1795bc0c85b1646bc7d9596bbe778cb84e5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Add MultiConfigParsed handler to deal with unstable build signaturesRichard Purdie2017-07-081-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses the newly added MultiConfigParsed event to handle problems where checksums in multiconfig build were not fuctioning as expected. The issue arises around SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS which contains entries like: * gcc-cross-${TARGET_ARCH}->virtual/${TARGET_PREFIX}libc-for-gcc * gcc-cross-${TARGET_ARCH}->linux-libc-headers These need to be expanded in the multiconfig data store but then placed into the shared main datastore used by the siggen code. The only other alternative would be a siggen instance for each multiconfig however that seemed even more complex and invasive. In real world usage, this issue would mean a qemux86 base config with other armv5 and armv7 configs (e.g. beaglebone and qemuarm) would try and build gcc-cross twice since dependencies normaly excluded (e.g. linux-libc-headers) would now be included. This breaks sstate reuse as well as breaking builds unless separate tmpdirs are used. This patch adds all the entries for each multiconfig. Whilst there may be duplicates, this shouldn't be an issue. (From OE-Core rev: 7267e7c000c76c44d09835d4cd2bc485b6a39a2a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: extend PACKAGECONFIG to also allow RRECOMMENDSAndré Draszik2017-06-281-3/+7
| | | | | | | | | | | | | | | | | | | | | It can be useful to add RRECOMMENDS to packages created, based on certain PACKAGECONFIGs. In particular where a package depends on certain linux kernel infrastructure (kernel modules) which might or might not be built as a module, being able to RRECOMMENDS instead of RDEPENDS on the relevant packages avoids build failures in case those modules are built statically into the kernel, i.e. in case no package is being created for them. Add another field to the PACKAGECONFIG syntax to achieve just that. (From OE-Core rev: ec96c985ce1c888c3ce3c4d964d7a106c3c88a5c) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Simplify BASEDEPENDS constructionRichard Purdie2017-05-161-14/+7
| | | | | | | | | | | This code dates from distant times before we had class overrides. The comments are also rather stale. Rewrite this code using class overrides which makes it safer, more modern and more easily understandable. (From OE-Core rev: fb3b160a6bf20a601d6cecf3f06a2b71c03fa91f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf: Add HOSTTOOLS_DIR for ${TMPDIR}/hosttoolsPeter Kjellerstedt2017-05-011-2/+2
| | | | | | | | | | | The path to where to install and find the tools copied from the host environment is already used in a couple of places. This warrants it to get its own variable. (From OE-Core rev: 8164c466943ffedff399009bf5547dba4f06d6c8) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: ensure HOSTTOOLS links point to executablesRoss Burton2017-03-311-2/+2
| | | | | | | | | | | | | Use the new executable argument to bb.utils.which() to ensure that the symlinks point to executable files and not for example directories with the right name which happened to be on $PATH. [ YOCTO #11256 ] (From OE-Core rev: 7f40c934c3aeb1d34f95f30b281e25a17c428fce) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/base: reformat HOSTTOOLS errorPaul Eggleton2017-03-161-1/+1
| | | | | | | | | | Adjust the message slightly to make it clearer, in particular mentioning the HOSTTOOLS variable. (From OE-Core rev: e022b27d189c1dcc7b3baea2b99dba8d724e6e2b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/bitbake.conf: Filter contents of PATH to only allow whitelisted toolsRichard Purdie2017-03-111-0/+22
| | | | | | | | | | | | | | | | | | | | | | We currently have a determinism problem in that the host tools present in PATH can influence the build. In particular, the presence of pkg-config on the build host can mask missing pkgconfig class dependencies. This adds in a new HOSTTOOLS variable and then uses it to set up a directory of symlinks to the whitelisted host tools. This directory is placed as PATH instead of the usual /usr/bin:/bin and so on. This should improve determinism of builds and avoid the issues which have been particularly obvious since the introduction of recipe specific sysroots. If users find there is a tool missing, they can extend HOSTTOOLS from a global class or global conf file. Right now the settings should be enough to build everything in OE-Core. (From OE-Core rev: fa764a403da34bb0ca9fa3767a9e9dba8d685965) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: improve wording when skipping recipes with incompatible licensesAndre McCurdy2017-03-081-1/+1
| | | | | | | | | | | | | | | The previous wording, e.g. ERROR: wget was skipped: incompatible with license GPLv3 isn't very clear and could be taken to imply that the recipe is incompatible with its own license. (From OE-Core rev: c2047067daadb40ff3a944f380c10b2a56b8e080) 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>
* base.bbclass: Fix OE_IMPORTSJoshua Watt2017-03-011-1/+1
| | | | | | | | | | Udpate OE_IMPORTS to include oe.license because it is being used. (From OE-Core rev: d0902a5c3babbd3b291fa494462e083794ca4bee) 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>
* classes: Drop now unneeded update_data callsRichard Purdie2017-02-151-2/+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>
* Switch to Recipe Specific SysrootsRichard Purdie2017-01-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is comparatively large and invasive. It does only do one thing, switching the system to build using recipe specific sysroots and where changes could be isolated from it, that has been done. With the current single sysroot approach, its possible for software to find things which aren't in their dependencies. This leads to a determinism problem and is a growing issue in several of the market segments where OE makes sense. The way to solve this problem for OE is to have seperate sysroots for each recipe and these will only contain the dependencies for that recipe. Its worth noting that this is not task specific sysroots and that OE's dependencies do vary enormously by task. This did result in some implementation challenges. There is nothing stopping the implementation of task specific sysroots at some later point based on this work but that as deemed a bridge too far right now. Implementation details: * Rather than installing the sysroot artefacts into a combined sysroots, they are now placed in TMPDIR/sysroot-components/PACKAGE_ARCH/PN. * WORKDIR/recipe-sysroot and WORKDIR/recipe-sysroot-native are built by hardlinking in files from the sysroot-component trees. These new directories are known as RECIPE_SYSROOT and RECIPE_SYSROOT_NATIVE. * This construction is primarily done by a new do_prepare_recipe_sysroot task which runs before do_configure and consists of a call to the extend_recipe_sysroot function. * Other tasks need things in the sysroot before/after this, e.g. do_patch needs quilt-native and do_package_write_deb needs dpkg-native. The code therefore inspects the dependencies for each task and adds extend_recipe_sysroot as a prefunc if it has populate_sysroot dependencies. * We have to do a search/replace 'fixme' operation on the files installed into the sysroot to change hardcoded paths into the correct ones. We create a fixmepath file in the component directory which lists the files which need this operation. * Some files have "postinstall" commands which need to run against them, e.g. gdk-pixbuf each time a new loader is added. These are handled by adding files in bindir with the name prefixed by "postinst-" and are run in each sysroot as its created if they're present. This did mean most sstate postinstalls have to be rewritten but there shouldn't be many of them. * Since a recipe can have multiple tasks and these tasks can run against each other at the same time we have to have a lock when we perform write operations against the sysroot. We also have to maintain manifests of what we install against a task checksum of the dependency. If the checksum changes, we remove its files and then add the new ones. * The autotools logic for filtering the view of m4 files is no longer needed (and was the model for the way extend_recipe_sysroot works). * For autotools, we used to build a combined m4 macros directory which had both the native and target m4 files. We can no longer do this so we use the target sysroot as the default and add the native sysroot as an extra backup include path. If we don't do this, we'd have to build target pkg-config before we could built anything using pkg-config for example (ditto gettext). Such dependencies would be painful so we haven't required that. * PKDDATA_DIR was moved out the sysroot and works as before using sstate to build a hybrid copy for each machine. The paths therefore changed, the behaviour did not. * The ccache class had to be reworked to function with rss. * The TCBOOTSTRAP sysroot for compiler bootstrap is no longer needed but the -initial data does have to be filtered out from the main recipe sysroots. Putting "-initial" in a normal recipe name therefore remains a bad idea. * The logic in insane needed tweaks to deal with the new path layout, as did the debug source file extraction code in package.bbclass. * The logic in sstate.bbclass had to be rewritten since it previously only performed search and replace on extracted sstate and we now need this to happen even if the compiled path was "correct". This in theory could cause a mild performance issue but since the sysroot data was the main data that needed this and we'd have to do it there regardless with rss, I've opted just to change the way the class for everything. The built output used to build the sstate output is now retained and installed rather than deleted. * The search and replace logic used in sstate objects also seemed weak/incorrect and didn't hold up against testing. This has been rewritten too. There are some assumptions made about paths, we save the 'proper' search and replace operations to fixmepath.cmd but then ignore this. What is here works but is a little hardcoded and an area for future improvement. * In order to work with eSDK we need a way to build something that looks like the old style sysroot. "bitbake build-sysroots" will construct such a sysroot based on everything in the components directory that matches the current MACHINE. It will allow transition of external tools and can built target or native variants or both. It also supports a clean task. I'd suggest not relying on this for anything other than transitional purposes though. To see XXX in that sysroot, you'd have to have built that in a previous bitbake invocation. * pseudo is run out of its components directory. This is fine as its statically linked. * The hacks for wayland to see allarch dependencies in the multilib case are no longer needed and can be dropped. * wic needed more extensive changes to work with rss and the fixes are in a separate commit series * Various oe-selftest tweaks were needed since tests did assume the location to binaries and the combined sysroot in several cases. * Most missing dependencies this work found have been sent out as separate patches as they were found but a few tweaks are still included here. * A late addition is that extend_recipe_sysroot became multilib aware and able to populate multilib sysroots. I had hoped not to have to add that complexity but the meta-environment recipe forced my hand. That implementation can probably be neater but this is on the list of things to cleanup later at this point. In summary, the impact people will likely see after this change: * Recipes may fail with missing dependencies, particularly native tools like gettext-native, glib-2.0-native and libxml2.0-native. Some hosts have these installed and will mask these errors * Any recipe/class using SSTATEPOSTINSTFUNCS will need that code rewriting into a postinst * There was a separate patch series dealing with roots postinst native dependency issues. Any postinst which expects native tools at rootfs time will need to mark that dependency with PACKAGE_WRITE_DEPS. There could well be other issues. This has been tested repeatedly against our autobuilders and oe-selftest and issues found have been fixed. We believe at least OE-Core is in good shape but that doesn't mean we've found all the issues. Also, the logging is a bit chatty at the moment. It does help if something goes wrong and goes to the task logfiles, not the console so I've intentionally left this like that for now. We can turn it down easily enough in due course. (From OE-Core rev: 809746f56df4b91af014bf6a3f28997d6698ac78) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar callsJoshua Lock2016-12-161-63/+63
| | | | | | | | | | | | | 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>
* classes/base: fix license file checksumming when source not under TMPDIRPaul Eggleton2016-12-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | With the changes to the code for extracting source for a recipe, we are properly executing the tasks for a recipe, which means their stamps (and therefore signatures) are important. When running devtool extract on the lsof recipe I noticed that do_fetch and do_unpack were executing a second time when we called for do_patch, and this turned out to be because LIC_FILES_CHKSUM in that recipe contains an entry which is an absolute path (has ${S} at the start). Normally this wouldn't be an issue since S is under TMPDIR and thus the existing code would ignore it, however devtool's extraction code extracts to a temporary directory which is not under TMPDIR; the result was the path to this file was not being ignored and the second time around when the license file had been extracted it was incorporated into the signature. We don't want this, so explicitly exclude S as well as B and WORKDIR for good measure. (From OE-Core rev: 1c99d74a862f25e23ea6465fab7ddc9ce74d6974) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Use bb.fatal() instead of raising FuncFailedUlf Magnusson2016-10-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | This sets a good example and avoids unnecessarily contributing to perceived complexity and cargo culting. Motivating quote below: < kergoth> the *original* intent was for the function/task to error via whatever appropriate means, bb.fatal, whatever, and funcfailed was what you'd catch if you were calling exec_func/exec_task. that is, it's what those functions raise, not what metadata functions should be raising < kergoth> it didn't end up being used that way < kergoth> but there's really never a reason to raise it yourself FuncFailed.__init__ takes a 'name' argument rather than a 'msg' argument, which also shows that the original purpose got lost. (From OE-Core rev: 9635af9785509a39c1ac2509740d46276119a0ca) Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* SDK: Allow changing SDKMACHINE without wiping TMP folderJuro Bystricky2016-09-281-1/+1
| | | | | | | | | | | | | | | | | | | When changing SDKMACHINE, we may encounter an error forcing us to wipe the TMP folder. Since only SDK_ARCH is captured in the PN of the crosssdk recipes, changes to SDK_OS result in conflicts. Eventually we hit the error: ERROR: ...: The recipe <...> is trying to install files into a shared area when those files already exist. The build has stopped as continuing in this scenario WILL break things This patchset addresses the problem by SDK_SYS as the recipe name suffix instead of SDK_ARCH. [YOCTO #9281] (From OE-Core rev: d2eccccb70e809d482c493922f23aef4409cfd82) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Drop unnecessary dirs settingRichard Purdie2016-09-221-1/+1
| | | | | | | | | | | | ${D} is listed in cleandirs so no need to list it in dirs as well. The default directory is ${B} so this is a cleanup which should have no changes to the execution. [YOCTO #10017] (From OE-Core rev: 7e0f95bf359bc3b5bb1578024a993e184de155cd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: cleanup d.getVar(var, 0)Robert Yang2016-09-141-1/+1
| | | | | | | | (From OE-Core rev: 33b0d940b09a5ce1462476614213a58d3d62e80d) 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>
* base, autotools: Append PACKAGECONFIG_CONFARGS to EXTRA_OECONF only in ↵Martin Jansa2016-09-031-6/+0
| | | | | | | | | | | | | autotools.bbclass * recipes which don't inherit autotools or cmake bbclass and want to use the configure options from PACKAGECONFIG need to handle PACKAGECONFIG_CONFARGS themselves. (From OE-Core rev: c98fb5f5129e71829ffab4449b3d28082bc95ab4) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license: simple verification of LICENSE_<pkg> valuesMarkus Lehtonen2016-08-251-0/+13
| | | | | | | | | | | | | | | | | | LICENSE should be a superset of all LICENSE_<pkg> values. That is, LICENSE should contain all licenses and LICENSE_<pkg> can be used to "filter" this on a per-package basis. LICENSE_<pkg> shouldn't contain anything that isn't specified in LICENSE. This patch implements simple checking of LICENSE_<pkg> values. It does do not do advanced parsing/matching of license expressions, but, checks that all licenses mentioned in LICENSE_<pkg> are also specified in LICENSE. A warning is printed if problems are found. (From OE-Core rev: 0f4163a12ea431d0ba6265880ee1e557333d3211) 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>
* base.bbclass wipe ${S} before unpacking sourceMarkus Lehtonen2016-08-041-10/+8
| | | | | | | | | | | Make sure that we have a pristine source tree after do_unpack. [YOCTO #9064] (From OE-Core rev: eccae514b71394ffaed8fc45dea7942152a334a1) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: p4 fetcher supports srcrevAndrew Bradford2016-06-171-0/+4
| | | | | | | | | | Enable the perforce fetcher to call bb.fetch2.get_srcrev() as it can use 'SRCREV = "${AUTOREV}"'. (From OE-Core rev: 9d6ac71e4d954d857ecb1708ab4fe4bc552244aa) Signed-off-by: Andrew Bradford <andrew.bradford@kodakalaris.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Complete transition to python3Richard Purdie2016-06-021-1/+1
| | | | | | | | | This patch contains all the other misc pieces of the transition to python3 which didn't make sense to be broken into individual patches. (From OE-Core rev: fcd6b38bab8517d83e1ed48eef1bca9a9a190f57) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Update to modern exception syntaxRichard Purdie2016-05-211-1/+1
| | | | | | | | | Update older exception syntax to modern one required by python 3. Compatible with python 2.7. (From OE-Core rev: d13f0ac614f1d1e2ef2c8ddc71cbfcf76a8dc3f2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/base: get_lic_checksum_file_list imporve validaton of url'sAníbal Limón2016-05-171-0/+3
| | | | | | | | | | | | | When specify an URL different that supported file:// the function returns an empty path causing an exception without notice the user that the URL is Malformed. [YOCTO #9211] (From OE-Core rev: 6c28251d3d187b60ceb534055dbd8b4fffd06429) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Introduce PACKAGECONFIG_CONFARGS variableMartin Jansa2016-04-191-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | * add separate variable for configuration options generated from PACKAGECONFIG setting, this helps other bbclasses and recipes to take advantage of PACKAGECONFIG mechanism, without including other options from EXTRA_OECONF * e.g. meta-qt5 recipes are abusing EXTRA_OECONF to get options from PACKAGECONFIG: EXTRA_QMAKEVARS_PRE += but with conf/distro/include/no-static-libs.inc it means getting --disable-static as invalid option inside EXTRA_QMAKEVARS_PRE as reported by Alexandre Belloni who tried to use poky with meta-qt5. * once we migrate all bbclasses and recipes to PACKAGECONFIG_CONFARGS we should also restrict EXTRA_OECONF append only to autotools.bbclass like I did for cmake.bbclass (From OE-Core rev: 0ea4a47bfc27d02594d489b27c029d3d3badf3d4) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Fixup PACKAGECONFIG incorrect mappingsRichard Purdie2016-04-031-3/+3
| | | | | | | | | | | | | PACKAGECONFIG doesn't work in cross-canadian recipes at the moment as DEPENDS are prepended with mlprefix. A recipe is either nativesdk, native or target so adjust the if statements accordingly, use inherits_class for more accurate recipe classification and add cross-canadian support. (From OE-Core rev: 4a172868a9423afb8a602413ef4935423ce51a5d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: avoid duplicate call to d.getVar('LICENSE', True)Andre McCurdy2016-04-011-4/+3
| | | | | | | | | | Reuse the 'license' variable, instead of calling d.getVar('LICENSE', True) again. (From OE-Core rev: 32a1df86877cd8e70baccd858847fa927508f159) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: drop obsolete HOSTTOOLS_WHITELIST_GPL-3.0Andre McCurdy2016-04-011-17/+8
| | | | | | | | | | | | | base.bbclass sets 'check_license' to False (and therefore skips license checking completely) for native, nativesdk, etc recipes (ie anything which could potentially be classed as "host tools"), so supporting a dedicated whitelist of GPLv3 host tools is not necessary. (From OE-Core rev: 8fc8b60005e7641861324c8541fb45058e7aab8e) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Add nodejs-native dependency for npm:// urlsRichard Purdie2016-02-281-0/+3
| | | | | | | | | With the addition of the npm fetcher, we add the native dependency handling too. (From OE-Core rev: 500c432419739e2be247d6feea3f4d85eb7ddfd0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: fix support for gitsm://Patrick Ohly2016-02-121-1/+1
| | | | | | | | | | | | | Before the "Improve handling of SRCPV" change, gitsm SRC_URI entries were merely missing a dependency on git for do_fetch. But after that change, the special handling for "needsrcrev" was not applied, leading to a fetcher error (older bitbake) or even a parse error (recent bitbake). (From OE-Core rev: 41d06f512504cb24bb727308d08490b8741f332d) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Make do_cleansstate nostampRichard Purdie2016-02-101-1/+2
| | | | | | | | | We always want the cleansstate task to run so it should be 'nostamp' like the other clean tasks. (From OE-Core rev: 187190bfe3f589a7d1acaa22fab4607f976635ce) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf/base: Improve handling of SRCPVRichard Purdie2016-02-101-0/+7
| | | | | | | | | | | | | | If SRCPV is set, it can be expanded when SRC_URI doesn't support it leading to errors. Avoid doing this by setting it only when it makes sense. This patch depends on the bitbake python expansion patch series. [YCOTO #7772] (From OE-Core rev: ce64da2b80f99c82d96513d8dfb5e572757b0cda) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: add ASSUME_PROVIDED dependency on wget-native for http fetchesRoss Burton2016-02-041-0/+4
| | | | | | | | | | For clarity and consistency, add a dependency on wget-native for any URIs that will be fetched using the wget fetcher, and add wget-native to ASSUME_PROVIDED. (From OE-Core rev: 91583704383aef3d4742630380fd3f1d38c4b00a) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Make sure that the directory for CONFIGURESTAMPFILE existsMarkus Lehtonen2016-01-311-0/+1
| | | | | | | (From OE-Core rev: bb82dc384bda48d746634ba1f4e315737993c794) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Move COMPATIBLE_MACHINE out the scope of SOURCE_MIRROR_FETCHRichard Purdie2016-01-311-11/+11
| | | | | | | | | | | | | | | Recipes setting COMPATIBLE_MACHINE are likely to have SRC_URI entries which can heavily depend on the configured machine. Skipping them for SOURCE_MIRROR_FETCH is therefore not advised and leads to build errors whilst not particularly improving source mirrors. [YOCTO #8802] (From OE-Core rev: b53038303374debf91ed73039cf79912f266acfe) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/base: don't print header if BUILDCFG_HEADER not setPaul Eggleton2015-12-281-1/+2
| | | | | | | | | | | | | If we don't want a header printed at the start of task execution (which we'd prefer not to within the extensible SDK) we can accomplish that by clearing BUILDCFG_VARS and BUILDCFG_HEADER, but that was still printing a load of blank lines. To keep things simple, check if BUILDCFG_HEADER is set to something before printing a header. (From OE-Core rev: d896d77c1d0fc56ff7019bfee3cf06fbc3ede8f3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: check for existing prefix when expanding names in PACKAGECONFIGRoss Burton2015-12-091-1/+4
| | | | | | | | | | | | | | | | | When the DEPENDS are added as part of the PACKAGECONFIG logic the list of packages are expanded so that any required nativesdk-/-native/multilib prefixes and suffixes are added. However the special handling of virtual/foo names doesn't check that the prefix already exists, which breaks under nativesdk as in that situation there's an explicit nativesdk- prefix *and* MLPREFIX is set to nativesdk-. This results in the same prefix being applied twice, and virtual packages such as virtual/libx11 ending up as virtual/nativesdk-nativesdk-libx11. (From OE-Core rev: 55ca1fb8f0e81ff739b3c46897e43356d1f760c3) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: Improve handling of switching virtual/x providersRichard Purdie2015-12-081-1/+19
| | | | | | | | | | | | | | | | | | | | | | If you build virtual/kernel, then change PREFERRED_PROVIDER_virtual/kernel from say "linux-yocto" to "linux-yocto-dev", you see errors from the sysroot about overlapping files. The automatic uninstall logic doesn't trigger since the other recipes is still technically parsed/buildable. What we can do is look at the value of PREFERRED_PROVIDER_virtual/X and raise SkipRecipe (skip parsing) if it provides this thing and its not selected. We skip cases no preferred provider is set, or the value is in MULTI_PROVIDER_WHITELIST.We also inform the user if they try to build something which conflicts with the configuration: $ bitbake linux-yocto-tiny ERROR: Nothing PROVIDES 'linux-yocto-tiny' ERROR: linux-yocto-tiny was skipped: PREFERRED_PROVIDER_virtual/kernel set to linux-yocto, not linux-yocto-tiny [YOCTO #4102] (From OE-Core rev: 9a3b992b7339f7aa892f1dff7d159747630b045d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: add automatic dependency on lzip-native for .lz SRC_URIRoss Burton2015-12-011-0/+4
| | | | | | | | | Now that the SRC_URI is parsed this can be done without false-positives. (From OE-Core rev: 6fac3caf3d70823c830178f2299ceee275a1edd1) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base: decode SRC_URI before adding implicit fetch dependenciesRoss Burton2015-12-011-33/+34
| | | | | | | | | | To avoid false positives such as a SRC_URI for http://foo.xz/foo.zip gaining a dependnecy on xz-native decode the URI so that precise tests can be done. (From OE-Core rev: a98a14844bc0b2ef8fc0426768fde40516279bf8) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Ensure pass setVar/setVarFlag strings, not integersRichard Purdie2015-11-241-4/+4
| | | | | | | | | | | This doesn't cause any issues right now but it make sense to standardise on consistently using strings in the data store. (From OE-Core rev: 99203fbe5ad470ef65cff93cec9d7f332883b5ee) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: considering multilib when setting LICENSE_EXCLUSIONJian Liu2015-10-271-1/+2
| | | | | | | | | | | | | | | | | | The PACKAGES is not mapped with MLPREFIX when setting LICENSE_EXCLUSION in base.bbclass. For example, For libgcc-dev, LICENSE_EXCLUSION-libgcc-dev=1 but for lib32-libgcc-dev, LICENSE_EXCLUSION-libgcc-dev=1 Obviously it is wrong for lib32-libgcc-dev. Add MLPREFIX before the package name during setting LICENSE_EXCLUSION (From OE-Core rev: 6597130256a1609c3e05ec5891aceaf549c37985) Signed-off-by: Jian Liu <jian.liu@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/base: provide hints on PACKAGECONFIG errorJoe MacDonald2015-10-191-1/+2
| | | | | | | | | | | | | | Commit 771f89498c introduces an error message that is very rarely hit and when it is, it is usually easy to trace the root cause very quickly. The information provided in the error message isn't enough to lead you back to the actual failure, however, so expand upon it a bit, pinpointing the specific package and flag that fails. (From OE-Core rev: ead4a552464309e6ef3381590994b6cea225ca20) Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "base.bbclass/blacklist.bbclass: remove doc item when d.getVarFlags()"Ross Burton2015-08-111-2/+0
| | | | | | | | | | | This deletes and therefore breaks PACKAGECONFIG[doc], so revert. This reverts commit b741780d43ad412f6a1ae91d8489ec3522447ea2. (From OE-Core rev: 45cff248f5f9f4fb2498c34963e6652cc1166737) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass/blacklist.bbclass: remove doc item when d.getVarFlags()Robert Yang2015-08-011-0/+2
| | | | | | | | | | The FOO[doc] is set in meta/conf/documentation.conf, we need remove it from d.getVarFlags()'s return dict when it causes many loops. (From OE-Core rev: 595a7af8d0a52b24e2bdb5c373c64d27b54bb25b) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: move invalid PACKAGECONFIG checking to insane.bbclassRobert Yang2015-08-011-4/+0
| | | | | | | | | | | | | | | | | | | There was a problem when check invalid PACKAGECONFIG in the anonymous function (when parsing), for example, there are two versions of a recipe: foo_1.0.bb foo_2.0.bb While foo_2.0.bb has a "PACKAGECONFIG[item] = 'x,y,z'", but foo_1.0.bb doesn't, if we set PACKAGECONFIG_pn-foo = "item" in a conf file, we would get the warning about invalid PACKAGECONFIG for foo_1.0.bb. Delay the checking to build time will fix the problem. [YOCTO #8065] (From OE-Core rev: 0a64dfcdb9f5a37771f881895be230392c4d0aff) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Note when including pn with INCOMPATIBLE_LICENSESBeth Flanagan2015-08-011-3/+26
| | | | | | | | | | | | | | | We need to be able to tell people if we WHITELIST a recipe that contains an incompatible licese. Example: If we set WHITELIST_GPL-3.0 ?= "foo", foo will end up on an image even if GPL-3.0 is incompatible. This is the correct behaviour but there is nothing telling people that it is even happening. (From OE-Core rev: c9da529943b2f563b7b0aeb43576c13dd3b6f932) Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* pixbufcache: Use sceneQueueComplete event to simplify usageRichard Purdie2015-07-311-1/+14
| | | | | | | | | | | | | | | | Ensuring the native pixbuf cache is correct after new loaders have been installed is tricky. This needs to be done without races and work regardless of whether the build is from sstate or freshly built for one or more modules. This adds a hook into base.bbclass which is then triggered by the code from pixbufcache. This patch is an improved version which means base.bbclass has no pixbuf knowledge and the mechanism can be reused in other cases. (From OE-Core rev: b411085fefc8582d24c172db5f6610705eb44c2f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>