aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2013-02-06package.bbclass: Replace undefined 'src' with valid variableKhem Raj
After rewrite of split_and_strip_files src var is no longer available here where it is used so we should replace it with a valid value Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package.bbclass: Ensure package_get_auto_pr is run at the correct pointRichard Purdie
This needs to run before PKGR and other variables using PRAUTO are used, including the expansion optimisations. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06insane.bbclass: Add missing R* variables to pkgvarcheckMartin Jansa
* check also RSUGGESTS, RCONFLICTS, RPROVIDES, RREPLACES Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package.bbclass: return list of packages created in do_split_packagesMartin Jansa
* sometimes it's useful to do something with packages created by do_split_packages later in do_package_prepend, e.g. in: http://lists.linuxtogo.org/pipermail/openembedded-devel/2013-February/043824.html I have .bbclass which adds some postinst, postrm and RDEPENDS, but ttf-mplus is using do_split_packages to create those packages Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package.bbclass: Pre-expand some variables to save timeRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package.bbclass: Better document the different phases of operationRichard Purdie
Add headers to document the different phases of do_package and make the steps clearer. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package.bbclass: Add PACKAGESPLITFUNCS variableRichard Purdie
Prepending to populate_packages is rather ugly and means its hard to trace errors and also profiling informaiton is summed together in one function. This patch starts to split out the prepends to become separate functions to avoid these issues. This is generally a neater way to write functions than prepending to where there can sometimes be variable scope issues and we've been bitten by whitespace issues in the past. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package.bbclass: Simplify empty directory removalRichard Purdie
Rather than an exec() per directory, we might as well exec one command and be done with it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package.bbclass: Various minor performance tweaksRichard Purdie
* Call getVar outside the loop * Drop unneeded PATH export (bitbake does this already) * Drop unused variable * Simplify if statement nesting * Simplify variable expandion to a getVar call (expand would just call getVar) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package.bbclass: Make use of cleandirs and dirs function flagsRichard Purdie
We can use the cleandirs and dirs flags for the fuctions to handle directory cleaning and creation at the bitbake level rather than using these calls within the functions Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06kernel.bbclass: Improve populate_packages_prependRichard Purdie
Small performance tweaks for populate_packages_prepend: * Compile the regexps once at the start * Don't keep importing a module which is already imported * No need to check PKG is set, we'd have failed long before now if it wasn't * Don't export PATH, bitbake takes care of this at the task level Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package.bbclass: Rewrite split_and_strip_filesRichard Purdie
The split_and_strip_files funciton was hard to follow and its usage of prefixes to strings was unusual. This rewrites it to use a list of hardlinks, symlinks and elffiles where each list is iterated over at the correct point. This means we can avoid creating dandling symlinks for example so we can simply delete the cleanup code for this. The isfile() check is also removed which gives a significant improvement in speed. Its uneeded since os.walk will have already checked things in files are files. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package.bbclass: Fix up bb.mkdirhier/bb.copyfile usageRichard Purdie
These are in bb.utils so lets the correct function and avoid the overhead of the fixup/warning for the deprecated usage. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06update-rc.d: Drop OVERRIDES codeRichard Purdie
The data store copy and overrides is overkill given the small number of accesses that are being made. This simplifies the code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06staging.bbclass: Drop unused/legacy functionRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06staging/insane.bbclass: Move legacy do_stage check iinto insane.bbclassRichard Purdie
We might as well put all the sanity checks in one place. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06insane.bbclass: Add documentation headers for logical code blocksRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06insane.bbclass: Add pkgvarcheck to check for suboptimal usages of variablesRichard Purdie
Check through the variables: 'RDEPENDS', 'RRECOMMENDS', 'FILES', 'pkg_preinst', 'pkg_postinst', 'pkg_prerm', 'pkg_postrm' and if there is a variable set which isn't package specific, inform the user of this. Using these variables without a package suffix is bad practise and complicates dependencies of packages unnecessarily as well as complicates the code. Lets convert the remaining issues and then we can take the small performance gain. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package.bbclass: use the multiprocess pool from bitbakeRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package: Process package stripping in parallelRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package: Don't export PATHRichard Purdie
PATH is already exported, we don't need to do this each time we run something, its just noise and overhead. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package.bbclass: Multithread per file dependency generation codeRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06sstate.bbclass: Ensure build directory is cleaned to start withRichard Purdie
This directory is cleaned upon completion however if a previous build crashes, it can lead to corrpution, hence ensure its clean at the start too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06sstate/path.py: Add copyhardlinktree() function and use for performance ↵Richard Purdie
optimisation Add a function which copys a tree as a set of hardlinks to the original files, then use this in sstate to reduce some of the overhead of sstate package creation since the file isn't actually copied. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06package_ipk, rootfs_ipk: remove the "set -x"Laurentiu Palcu
Comment the "set -x" lines since these will add a lot of extra, not always necessary, debug messages in the log.do_rootfs. [YOCTO #2599] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-06image.bbclass: add a proper error message if hook script failsLaurentiu Palcu
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-06qemu.bbclass: return qemuwrapper instead of qemu-allarchLaurentiu Palcu
When qemu bbclass is inherited from a recipe that is not architecture dependent, qemu_run_binary will return "qemu-allarch". However this binary does not exist. Instead, return "qemuwrapper" which will, in turn, execute the right binary for the target the image was built for. [YOCTO #2599] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-06add fontcache.bbclassLaurentiu Palcu
All font packages should inherit this class in order to generate the proper postinst/postrm scriptlets. The scriptlets will actually create a host intercept hook that will be executed at the end, at do_rootfs time, after all packages have been installed. This is good when there are many font packages. [YOCTO #2923] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-06ipk: use OPKGLIBDIR in all placesMartin Jansa
* it's not recommended to change this value, because it breaks upgrade path on target (all old u-a alternatives are forgot in old OPKGLIBDIR value * but make it consistent, so if someone really want to change that, then setting OPKGLIBDIR_distro in distro.conf would be enough * without this there were at least 4 places to change: rootfs_ipk: opkglibdir variable (notice that I've removed /opkg from it to correspond with EXTRA_OECONF option used in opkg recipes package_ipk: ${target_rootfs}${localstatedir}/lib/opkg/ hardcoded in package_install_internal_ipk opkg-collateral: value in lists file opkg: EXTRA_OECONF for all 3 classes, FILES_libopkg, do_install * validated with buildhistory that without OPKGLIBDIR explicitly set the output is the same and that after setting OPKGLIBDIR_forcevariable := "${libdir}" everything including empty directory from package_ipk is moved to libdir Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2013-02-04sip.bbclass: improve RDEPENDS to add python-sip only for PNMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-04cpan-base.bbclass: Improve RDEPENDS to be package specificRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-04package.bbclass: Allow per-package SKIP_FILEDEPSPeter Seebach
The existing check for SKIP_FILEDEPS can be overridden per recipe using SKIP_FILEDEPS_pn-${PN}. However, there's no mechanism for letting a single package within a recipe use SKIP_FILEDEPS. This patch adds SKIP_FILEDEPS_<pkg>, by analogy to FILES_<pkg>. Note that it only works one way; if the recipe has SKIP_FILEDEPS = 1, the checks for individual packages will never be reached. Signed-off-by: Peter Seebach <peter.seebach@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-04kernel-yocto/linux-yocto-custom: support low bandwidth optionsBruce Ashfield
To support configurations where active development is not being done within the oe/bitbake build environment and restricted bandwidth situations, this commit allows the SRC_URI to point to a kernel tgz instead of a full git repository. Outside of the upstream tgz instead of a kernel git repository, the restrictions, config and patch process is the same as any linux-yocto-custom recipe. An example linux-yocto-custom based recipe would have a configuration like this to build the 3.7 kernel, using an externally supplied config, from the 3.7 tgz: SRC_URI = "http://kernel.org/pub/linux/kernel/v3.0/linux-3.7.tar.bz2" PV = "3.7" S = "${WORKDIR}/linux-3.7" SRC_URI[md5sum] = "5323f3faadd051e83af605a63be5ea2e" SRC_URI[sha256sum] = "dc08d87a579fe2918362e6666e503a95a76296419195cb499aa9dd4dbe171a9e" [YOCTO #2686] Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-04kernel-yocto: allow multiple / shared kernel feature directoriesBruce Ashfield
To promote the reuse and sharing of configuration fragments this change allows any kernel-yocto based recipe to have multiple alternate git repositories which provide kernel feature directory trees listed on the SRC_URI. These feature directories are in addition to any in-tree kernel meta data branches that may be available (described via the KMETA variable in linux-yocto recipes). Features found within these directories can be used from recipes via the KERNEL_FEATURES variable. Features found within a feature directory are free to include any other features that are available in any directories. In both cases the path to a feature description (a .scc file) is relative to the root of a given feature directory (which is how existing .scc files work) The search order for features is determined by the order that repositories appear on the SRC_URI. Normal SRC_URI rules apply to any repository that is added as a kernel feature container. A SRCREV must be supplied and it must be unpacked to a unique directory, which is controlled via the "destsuffic" url parameter. In addition to these standard requirements, any kernel feature repository reference should identify itself via the "type=kmeta" url parameter. If type=kmeta is not supplied, the repository will not be processed for kernel features. As an example, the following in a linux-yocto bbappend makes two additional feature directories available to KERNEL_FEATURES and fragments. SRC_URI += "git://git.yoctoproject.org/yocto-kernel-cache;protocol=git;branch=master;type=kmeta;name=feat1;destsuffix=kernel-cache/" SRC_URI += "git://${KSRC_linux_yocto_3_4};protocol=file;branch=meta;name=feat2;type=kmeta;destsuffix=kernel-features-experimental/" SRCREV_feat1 = "${AUTOREV}" SRCREV_feat2 = "${AUTOREV}" Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-04kernel-yocto: fix .scc and .cfg matchingBruce Ashfield
SRC_URIs that contained git repositories or other constructs that resulted in an extension of "." or a substring of "scc" or "cfg" were matching the tests for patches and configs. This was due to a python tuple being used instead of an array. Switching to an array makes the match exact and the behaviour we want. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-04kernel-yocto: make configuration audit details debug onlyBruce Ashfield
The details of the kernel configuration audit are typically a debug action, so should be moved to bb.debug(). But in order to maintain visibility of the results, a reference to the log file is provided in the standard message. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-04cmake: reset B from autotools, as this class doesnt like itRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01gtk-icon-cache: Fix rdepends constructionSaul Wold
The rdepends getVar is returning NoneType and the string constuction fails this occurs with the hicolor-icon-theme recipe. Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-01module-base.bbclass: Call make instead of oe_runmake in do_make_scriptsKhem Raj
This makes the external module compilation a bit more robust for cases where external module recipes may be passing extra params to make via EXTRA_OEMAKE, and more than often one needs to pass M=$(PWD) when building external modules and if we use EXTRA_OEMAKE that would mean that it would appear in do_make_scripts as well and since we are only changing the reference kernel src tree here it will not run the make scripts in desired directory. It is also well explained in top makefile in kernel tree around line# 1335 in 3.4 |else # KBUILD_EXTMOD | |### |# External module support. |# When building external modules the kernel used as basis is considered |# read-only, and no consistency checks are made and the make |# system is not used on the basis kernel. If updates are required |# in the basis kernel ordinary make commands (without M=...) must |# be used. Therefore passing M=... will not do the updates in the basis kernel as expected with 'make scripts' so we have to bypass EXTRA_OEMAKE [Yocto #3787] Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-02-01module.bbclass: Allow for modules to be packaged seperate from ${PN}Saul Wold
This patch will allow recipes that provide kernel modules to package the module or modules in specific packages. That list is contained in MODULE_PACKAGES, this defaults to to preserve the current behavior. The package can also define MODULE_FILES to specify files. [YOCTO #3803] (From OE-Core rev: c1ff0467bf03a3342846f0d9dde74e34b740798f) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01license: fix LICENSE_CREATE_PACKAGE to stay disabled by defaultMartin Jansa
* as reported by Enrico on #oe 11:06:50 < ensc|w> JaMa: might this be caused by dc78ef91a2bf01efb8028c9afbe69e506e016265 which checks for 'd.getVar('LICENSE_CREATE_PACKAGE', True)' evaluating to 'True' for every string (including the default 0) (From OE-Core rev: bc42585ad9ca3a9891459ec3234893dff420b95b) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01autotools.bbclass: add EXTRACONFFUNCS variableConstantin Musca
- add EXTRACONFFUNCS variable in order to make it possible to inject tasks after autotools_preconfigure (From OE-Core rev: eafaeee58ab7a8f0613f54b8411f41ccefdf94c3) Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01package.bbclass: Use expanded RDEPENDS in read_shlibdepsRichard Purdie
We may as well expand the RDEPENDS when reading and writing as this function does. if we don't do this, we could accidentally duplicate data and it also turns out to be much less efficient. (From OE-Core rev: d62a3151e7b252911c172a605b3089de355663c5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01package: Create global package file list and use throughout PACKAGEFUNCSRichard Purdie
Currently we do a signficant amount of tree traversal in many different places which in inefficient. We can assume that the files don't change and cache the file list which gives an efficiency improvement which this patch does using a global variable. (From OE-Core rev: 2d7608842d2dab07065e60aab729a5c8fd6b7907) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01package.bbclass: Improve package_fixsymlinksRichard Purdie
Improve package_fixsymlinks so we don't handle RDEPENDS for every single package in PACKAGES. (From OE-Core rev: 20ff8feb95d54e4db646f8c0cb006ce187e288af) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01package.bbclass: Tweak PACKAGEFUNCSRichard Purdie
Move package_rename_hook call into PACKAGEFUNCS and also move package_get_auto_pr to a more appropriate execution point, grouping package metadata handling functions together. (From OE-Core rev: a3f41cfbc8923e54198d10db292a11ef2edda4d7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01package.bbclass: Split out package_fixsymlinks functionRichard Purdie
The symlink handling code doesn't need to being part of populate_packages and is logically separate so split it out into a separate function, package_fixsymlinks. (From OE-Core rev: fc964ed2b558b08327e2bc8c93ada80ca9d97337) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01package.bbclass: Move PKG handling code to emit_pkgdataRichard Purdie
We only use the PKG variable in emit_pkgdata so we might as well move the fallback code there, allowing restructuring of other parts of the metadata. (From OE-Core rev: 0136ae9a5f719f0e7ba6e00bfd366c0e61b3b3f2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01package.bbclass: Avoid copying the datastore for FILES handlingRichard Purdie
There is no real point in adjusting overrides and creating a copy of the datastore, just to access a single variable. We can do this just as easily with a slightly more complicated getVar call. This improves performance. (From OE-Core rev: 69f4351809359a0c7c38e8f233f3e3f7680ed2e2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-01package.bbclass: Check FILES once, not once per loop iterationRichard Purdie
There is no need to check FILES in each loop iteration, we can just check it once at the start when we read the variable. (From OE-Core rev: 1bcc5cba12cbb1b846b433719d1b0820f5a97105) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>