aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2015-06-23meta: Add explict getVar param for (non) expansionRichard Purdie
Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23distutils-common-base: add to, don't set, FILES_${PN}Joshua Lock
If we set FILES_${PN} and a recipe inherits other classes that modify FILES_${PN} *before* distutils-common-base is included, any changes to FILES_${PN} made by those classes are lost. Instead, append the additional directories we want to include in FILES_${PN} Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23image-live: Set syslinux timeout to 5sEd Bartosh
Increased syslinux timeout to 5s as default 1s timeout is not enough to notice syslinux prompt on some devices. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-23Revert "distrodata: Remove unnecessary include of package_regex.inc"Ross Burton
Instead of asking the user to include a number of configuration files, the class can do this. Next step is to fix the documentation. This reverts commit 2a4ee94667d4d356cad2ca6d60a100a30c92737b. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23insane.bbclass: fix false negative in build-deps QA checkPatrick Ohly
When a recipe called 'foobar-test' links against 'foobar' without listing that in DEPENDS, the build-deps check misses that error because it looks for 'foobar' in a package string containing (among others) the 'foobar-test' name, leading to the incorrect conclusion that the package is listed as dependency. The 'packages' string needs to be split into individual package names before the check. Doing that once directly after reading the value is more efficient than splitting inside package_qa_check_rdepends() because the caller also needs the individual components. Also use a set to speed up the 'package in packages' check. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23copyleft_filter.bbclass: Allow to filter on nameMariano Lopez
The archiver uses a license based filter to provide the source code. This patch allows to search on name based on two new variables (COPYLEFT_PN_INCLUDE, COPYLEFT_PN_EXCLUDE). Both variables are empty by default. The filter by name has higher priority than the license filter. [YOCTO # 6929] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23base.class: warn for invalid PACKAGECONFIGRobert Yang
There may be typos or out of date values in PACKAGECONFIG, check and warn them. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23logging.bbclass: avoid bashism in bbdebug()Patrick Ohly
Checking the bbdebug() debug level parameter with a regular test expression only works in bash. Using tr to filter out digits and then checking whether anything is left achieves the same result and is more portable. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-23distutils: regenerate pyc files after being modified by sedAlejandro Hernandez
py files are edited by sed and therefore *.pyc files are recreated on first boot, but if you have a read-only filesystem this is not possible. This patch creates pyc files directly after the py files are modified. [YOCTO #7722] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Thomas Roos <roosesweb@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-18classes/externalsrc: handle tasks with existing lockfilesPaul Eggleton
We need to ensure we add a leading space to the value we are prepending here in case lockfiles already has a value. Fixes [YOCTO #7813]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-06-16packagedata: Fix to ensure variables expand correctlyRichard Purdie
If we set unsuffixed variables here there is a chance they could clobber override versions of that variable, e.g. DESCRIPTION could clobber DESCRIPTION_<pkgname>. We therefore don't clobber for the unsuffixed variable versions by using the parsing flag to setVar. This becomes a problem with the modifications to bitbake to have continual expansion of the datastore, its about the one place this turns out to be problematic. The parameter to setVar works with current bitbake even though we don't have the new API since it gets swallowed by the logging code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-16multilib_global: Stop empty space influencing RPROVIDESRichard Purdie
If the resulting RPROVIDES is empty, don't set it. This streamlines pkgdata slightly removing empty values and avoids other errors which confuse the datastore when the variable is best left unset. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-11package_ipk/deb/rpm: Improve OVERRIDES handlingRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-11cmake: extend CMAKE_MODULE_PATH instead of settingRoss Burton
Some (e.g. piglit) CMakeList.txt files will extend CMAKE_MODULE_PATH before calling project(), which is when the toolchain.cmake file is parsed. In this situation the CMAKE_MODULE_PATH is overwritten, so handle this by appending in toolchain.cmake instead of assigning. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11multilib.bbclass: use package_qa_handle_errorRobert Yang
Use package_qa_handle_error to handle the QA issue. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-06-11update-rc.d.bbclass: add MLPREFIX when set RRECOMMENDSRobert Yang
Fixed when build with multilib: WARNING: Multilib QA Issue: lib32-alsa-state package lib32-alsa-state - suspicious values 'update-rc.d' in RRECOMMENDS WARNING: Multilib QA Issue: lib32-modutils-initscripts package lib32-modutils-initscripts - suspicious values 'update-rc.d' in RRECOMMENDS WARNING: Multilib QA Issue: lib32-init-ifupdown package lib32-init-ifupdown - suspicious values 'update-rc.d' in RRECOMMENDS WARNING: Multilib QA Issue: lib32-xserver-nodm-init package lib32-xserver-nodm-init - suspicious values 'update-rc.d' in RRECOMMENDS WARNING: Multilib QA Issue: lib32-sysklogd package lib32-sysklogd - suspicious values 'update-rc.d' in RRECOMMENDS Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2015-06-11boot-direct.bbclass: Add support for VDI imagesJuro Bystricky
Same treatment for both VMDK and VDI images. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11sanity.bbclass: Prevent 'vdi' and 'live' to be built togetherJuro Bystricky
Same reason and check as for vmdk. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11image: Support for VDIJuro Bystricky
Added support for VirtualBox VDI format. The support was implemented by merging with the already existing VMDK support for VM player by creating a new class image-vm.bbclass. This class replaces the previous VMDK only image-vmdk.class. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11insane: errors out on binaries installed by allarch-inherit recipesCristian Iorga
If a prebuilt binary is installed via a recipe that inherits allarch, an odd-looking traceback is thrown out. Fixed by implementing a proper check and outputting an error message that clarifies the issue. Fixes [YOCTO #7662]. Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-10sstate: Add eventhandler which cleans up stale recipe dataRichard Purdie
"Incremental builds do not work well when renaming recipes or changing architecture" is a long standing issue which causes people considerable pain. We've struggled for a long time to come up with a way to generically address the problem. There are additional issues where removal of a layer caused data to continue to exist and additionally, changing DISTRO_FEATURES also caused problems in an existing TMPDIR. This patch attempts to address this by adding a mapping between stamp files and manifests. After parsing we can easily tell which stamp files are still reachable, if any manifest has a stamp that can no longer be reached, we can remove it. Since this code ties this to the sstate architecture list, it will not remove data from other than the current MACHINE (and its active architectures). It does not clean the sstate cache so if another build activates something which was cleaned, it should reinstall from sstate. We can also go one step further, depending on the setting of SSTATE_PRUNE_OBSOLETEWORKDIR, workdirs which are no longer active can also be removed. This avoids the buildup of many old copies of data in WORKDIR for example when versions are upgraded. The one thing which may surprise people with this change is if you remove a layer, data added by that layer will be "uninstalled" before the next build continues. I believe this is a feature and a good thing to do though. This code is safe with existing builds. If something isn't in the new index it simply isn't removed. Since changes to the sstate code trigger a rebuild, after this merges, we can assume the code will start to detect changes from that point onwards. [YOCTO #4102] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-08distrodata: Use Python CSV instead of did by handAníbal Limón
Fix CSV generation in distrodata class using Python CSV module before it some errors happen when read due to incorrect quoting/delimiters. [YOCTO #7777] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-08distrodata: checkpkg make usage of oe.recipeutils.get_recipe_upstream_versionAníbal Limón
Now get_recipe_upstream_version function exists in oe.recipeutils module to avoid duplicate code make usage of it. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-06-08distrodata: Remove unnecessary include of package_regex.incAníbal Limón
This causes a warning when follow documentation to use distrodata class that points to include, include conf/distro/include/distro_alias.inc include conf/distro/include/recipe_color.inc include conf/distro/include/maintainers.inc include conf/distro/include/upstream_tracking.inc include conf/distro/include/package_regex.inc INHERIT+= "distrodata" Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-06-08python3-distribute: Upgrade to python3-setuptools 15.2Alejandro Hernandez
python3-distribute was merged back to python3-setuptools in 2013, and it is no longer being maintained, this upgrade also provides functionality that will be needed for python3-pip. [YOCTO #7763] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
2015-06-08cmake: Whitespace fixMoritz Blume
Signed-off-by: Moritz Blume <moritz.blume@bmw-carit.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-03xserver-xorg: Upgrade 1.16.3 -> 1.17.1 (OELAYOUT_ABI change)Jussi Kukkonen
* Increase OELAYOUT_ABI: this is required because the xf86-video-modesetting package moves from its own recipe to xserver-xorg and sanity check cannot handle that currently. The upgrade will delete old xf86-video-modesetting files from sysroots. * Remove upstreamed xserver-xorg patches * Remove xf86-video-modesetting recipe: the driver is now included in xserver-xorg recipe, which now produces the xf86-video-modesetting package. The package version changes from 0.9 to 1.17.1 * Update xserver-xorg license checksum: modesetting license info (another MIT one) has been added to the file Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
2015-06-03distutils.bbclass: consistency between error message and setup.py's commandMario Domenech Goulart
setup.py was called with build as argument, but the error message would report build_ext. Signed-off-by: Mario Domenech Goulart <mario@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-01sstate: Add note when performing sstate mirror checksRichard Purdie
The build can pause whilst remote sstate mirrors are checked for sstate objects. Inform the user this is happening. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-01sstate: Parallelise checkstatus calls for sstate mirrorRichard Purdie
Currently the urls are checked serially which is a performance bottleneck when looking at http:// urls in particular. This adds code to check the url status in parallel, mirroring the way we do this elsewhere. We need the datastore for the fetcher so we use threads, not multiprocess. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-01base: Fix license checksum rebuild problemsRichard Purdie
"MACHINE=qemux86-64 bitbake init-ifupdown; MACHINE=genericx86-64 bitbake init-ifupdown" shows a rebuild when it would be expected. The reason is a LIC_FILES_CHKSUM which contains file://${WORKDIR}, an absolute path which doesn't exist in the first build but does in the second, causing a signature change and a rebuild. Fix the problem by ignoring any file:// url which resolves since TMPDIR for license file dependency purposes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-27update-rc.d: Improve RRECOMMENDS handlingRichard Purdie
Unfortunately the combination of: RRECOMMENDS_${PN} = "X" UPDATERCPN = "${PN}" RRECOMMENDS_${UPDATERCPN}_append = "Y" is tricky for bitbake to order correctly since RRECOMMENDS_${UPDATERCPN} can become "Y" which can then completely overwrite RRECOMMENDS_${PN}. Avoid these issues and improve handling in general by explictly setting the RRECOMMENDS on the list of packages modified in the general code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-26kernel: Build uImage only when really neededMarek Vasut
Build the uImage file using the kernel build system only when it is really required, which is only in case KEEPUIMAGE == yes. Otherwise, just build zImage, since the Yocto build system will handle the uImage generation for us. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Koen Kooi <koen@dominion.thruhere.net> Cc: Paul Eggleton <paul.eggleton@linux.intel.com> Cc: Ross Burton <ross.burton@intel.com> Cc: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-26kernel: Add basic fitImage supportMarek Vasut
This patch adds support for generating a kernel fitImage, which is a a successor to the uImage format. Unlike uImage, which could only contain the kernel image itself, the fitImage can contain all kinds of artifacts, like the kernel image, device tree blobs, initramfs images, binary firmwares etc. Furthermore, the fitImage supports different kinds of checksums, not only CRC32 like the uImage did. Last, but not least, fitImage supports signatures such that either the whole image or it's parts can be signed and then in turn can be verified by the bootloader. So far we only add support for wrapping the kernel image and DTB into the fitImage. The fitImage uses the sha1 checksum, which is the default. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Koen Kooi <koen@dominion.thruhere.net> Cc: Paul Eggleton <paul.eggleton@linux.intel.com> Cc: Ross Burton <ross.burton@intel.com> Cc: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-26kernel: Separate out uboot_prep_kimageMarek Vasut
Separate the function which prepares the kernel for packing into uImage into separate class, so this function can be reused by the fitImage class. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Koen Kooi <koen@dominion.thruhere.net> Cc: Paul Eggleton <paul.eggleton@linux.intel.com> Cc: Ross Burton <ross.burton@intel.com> Cc: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-26kernel: Pull uImage generation into separate classMarek Vasut
Pull the uImage image format generation from kernel.bbclass into a separate kernel-uimage.bbclass. Introduce new KERNEL_CLASSES variable, which allows registration of additional classes which implement new kernel image types. The default value of is to register kernel-uimage to preserve the original behavior. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Koen Kooi <koen@dominion.thruhere.net> Cc: Paul Eggleton <paul.eggleton@linux.intel.com> Cc: Ross Burton <ross.burton@intel.com> Cc: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-26kernel: Pull out the linux.bin generationMarek Vasut
Pull the generation of linux.bin image, which is then packed into uImage, into a separate function. No functional change. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Koen Kooi <koen@dominion.thruhere.net> Cc: Paul Eggleton <paul.eggleton@linux.intel.com> Cc: Ross Burton <ross.burton@intel.com> Cc: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-26kernel: Rework do_uboot_mkimageMarek Vasut
Rework the function so part it's internals can be re-used by fitImage image type. The name of the temporary file , linux.bin , is recycled a little more as it's now used for both the case where it is gzip compressed and where it is not. This should be fine, since the file is temporary and removed after the uImage was created anyway. There is no functional change here. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Koen Kooi <koen@dominion.thruhere.net> Cc: Paul Eggleton <paul.eggleton@linux.intel.com> Cc: Ross Burton <ross.burton@intel.com> Cc: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-26kernel: Clean up KERNEL_IMAGETYPE_FOR_MAKEMarek Vasut
Remove the lambda function setting KERNEL_IMAGETYPE_FOR_MAKE and instead set it in the anonymous python function. This also allows us to handle image types which are not supported directly by kernel, but require some other kernel target to be built. This is the case for example with the fitImage, which is the uImage successor. There is no functional change. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Koen Kooi <koen@dominion.thruhere.net> Cc: Paul Eggleton <paul.eggleton@linux.intel.com> Cc: Ross Burton <ross.burton@intel.com> Cc: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-25native: Improve PROVIDES handlingRichard Purdie
Since this class works on pre finalised data, the logic hasn't needed to be exact. If we change the way the finalised data works, we find that certain dependencies can be dropped (e.g. pn isn't in the name). To fix this, restructure the function to alter each entry in turn and not drop any entries. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-25autotools: Use space with prepend to clean up variable whitespaceRichard Purdie
Correct the whitespace in this variable to make this more readable when debugging, no functional change. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-23image.bbclass: Add a method for creating a companion debug filesystemMark Hatle
The companion debug filesystem contains only the package database and the complementary *-dbg packages for the main filesystem component. This is useful in a production environment to produce a companion filesystem capable of remote system debugging, without requiring corresponding debug symbols or source code on the device. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> If dbg pkgs have already been installed to the rootfs image, the installation to companion debug filesystem will fail, because both of image creation make use of the same pm database. In this situation, try to copy installed dbg files from rootfs image to companion debug filesystem. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Acked-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-23package.bbclass: Include missing variables on PACKAGEVARSLeonardo Sandoval
PACKAGEVARS appended on this commit: LICENSE SECTION pkg_preinst pkg_prerm RREPLACES GROUPMEMS_PARAM SYSTEMD_AUTO_ENABLE [Yocto #7754] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-05-23toolchain-scripts.bbclass: fix quoting for CCACHE_PATHAndre McCurdy
Single quotes prevent expansion of $sdkpathnative$bindir. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-05-23classes/buildhistory: ensure that git user email and name are setPaul Eggleton
The git user.email and user.name settings must be set or the commit to the buildhistory repo (when BUILDHISTORY_COMMIT is set to "1") will fail. If the user hasn't set these, set some dummy values since the actual value is unlikely to be particularly useful and it's far worse for the commit not to be done leaving the repository in a partially set up state. Prompted by [YOCTO #6973]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-05-23buildstats-summary: add eventmaskChen Qi
Add eventmask 'bb.event.BuildCompleted' for buildstats_summary handler to avoid running the codes in the handler everytime there's an event. The codes in buildstats_summary only need to run for bb.event.BuildCompleted. So add this event mask. Also, we remove the redundant isinstance() statement in the handler. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-05-22linux-yocto: drop suggestion of devshell for patch failuresBruce Ashfield
When a patch fails to apply, the kernel-yocto bbclass attempted to be helpful and suggest that devshell be used to fix the issue. The only problem is that you can't get to devshell if a patch is failing. We drop this bad advise and instead point to the linux source directory. [YOCTO: #6202] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-05-21sanity.bbclass: import subprocess in correct functionJussi Kukkonen
check_sanity() no longer needs the subprocess module but sanity_handle_abichanges() does use subprocess.call(). Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-05-21license_class: Add explicity avoid of CLOSED license in validationsAníbal Limón
The CLOSED license isn't a generic license it is a set and can be any closed source license. [YOCTO #7752] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-05-20sstate: Add handling of do_shared_workdir taskRichard Purdie
Changing TMPDIR and rebuilding an image was resulting in rebuilds of kernels due to dependencies on the shared_workdir task. If installed from sstate, nothing needs this task so add it to the whitelisted task patterns. After this change, the kernel does not rebuild when a new TMPDIR and hot sstate cache is used. 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>