aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
AgeCommit message (Collapse)Author
2012-07-19Remove a number of unneeded import os/bb callsRichard Purdie
The bb and os modules are always imported so having these extra import calls are a waste of space/execution time. They also set a bad example for people copy and pasting code so clean them up. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19Convert tab indentation in python functions into four-spaceRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17base.bbclass: add GNUmakefile to the list of possible makefile namesRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-07-03base.bbclass: Add cross-canadian-${TRANSLATED_TARGET_ARCH} to the license ↵Mark Hatle
exclusion list This appears to be an oversight in the original implementation. All of the host package types were being ignored except for the SDK cross-canadian type. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2012-05-30ccache: Separate out into its own classRichard Purdie
Currently, ccache is used if it is present. When building from scratch it gives no performance improvement and creates a ton of empty directories even when its not in use. This change moves ccache support to a bbclass file which the user can choose to enable. This should make builds more determinstic and make it easier/clearer to the end user when its being used and when it is not. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-24classes/base: add checksum file list at parse timePaul Eggleton
Connect the new fetcher file checksum code so that we get a list of the files to be checksummed at parse time. The file-checksums flag will not be read unless we are using a version of BitBake that supports the function we call within it, so it is safe to include this change even when the metadata will still be used with older versions of BitBake. Implements [YOCTO #2044]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2012-05-03base.bbclass: use isinstance for base_eventhandlerChristopher Larson
Signed-off-by: Christopher Larson <kergoth@gmail.com>
2012-05-03bitbake.conf: shift build config summary control to hereChristopher Larson
Signed-off-by: Christopher Larson <kergoth@gmail.com>
2012-04-26classes: Add recipe class to overridesRichard Purdie
We have currently no override to detect a recipe being build cross, crosssdk or for target at times we can use virtclass-native and virtclass-nativesdk to override stuff in recipes but we dont have way to modify a variables based on recipe type always. This patch adds in such an override and in particular makes a target override class available. With this change now we can say: EXTRA_OECONF_class-target = "...." EXTRA_OECONF_class-native = "..." EXTRA_OECONF_class-nativesdk = "..." EXTRA_OECONF_class-crosssdk= "..." Based of an original patch by Khem Raj Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-13base.bbclass: Fix PACKAGECONFIG issues with native and nativesdk ↵Richard Purdie
BBCLASSEXTEND recipes (and multilib) This patch fixes up the issues that were being seen where BBCLASSEXTEND and PACKAGECONFIG were interacting badly. It also ensures PACKAGECONFIG interacts properly with multilib builds. Ideally some of this code will be abstracted into lib/oe/classextend.py but at this point in release more invasive changes like this are inappropriate. This patch also removed empty strings from expressions rather than passing them around as this was complicating the additional code unnecessarily. The patch was verified against the OE-Core metadata where the return values of expandFilter() were sanity checked by hand for native/nativesdk and multilib combinations. [YOCTO #2225] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-25INCOMPATIBLE_LICENSE: support for spdx and pkg licensesElizabeth Flanagan
This adds a few things to the incompatible license functionality 1. INCOMPATIBLE_LICENSE was unable to distinguish any variation within LICENSE (e.g. GPLv3 v. GPLv3.0). This now utilizes the SPDXLICENSEMAP of the license indicated as INCOMPATIBLE_LICENSE 2. Given a recipe where the main LICENSE was incompatible but a package of the recipe was compatible, the entire recipe would be excluded. This allows us some finer grained control over what exactly gets excluded. Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05base.bbclass: Fix PACKAGECONFIG handling when no flags are setRichard Purdie
When the main PACKAGECONFIG variable was empty with no flags set, the options were not being added to explicitly disable features. This patch corrects that problem and ensures the disable fields are correctly parsed and added to variables. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)Richard Purdie
sed \ -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data.expand *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)Richard Purdie
Using "1" with getVar is bad coding style and "True" is preferred. This patch is a sed over the meta directory of the form: sed \ -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \ -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \ -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta/classes: Convert to use appendVar and appendVarFlagsRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-02base.bbclass: If unpacking again, wipe out ${S}/patchesRichard Purdie
If we unpack again, its assumed the data in any patches directory is invalid since do_patch will run again. This ensures old patch data doesn't get reused in a confused way. Ideally we should probably wipe out ${S} here but that is probably a change for another time. [YOCTO #2043 partially] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-01site.conf.sample: Fix broken SOCKS proxy setup and configurationInaky Perez-Gonzalez
SOCKS proxy specification with git was using conflicting methods and thus was failing when mixed SOCKS needs were in place (requiring no proxy for some hosts and proxy for the rest) - GIT_PROXY_COMMAND is an environment variable GIT uses to OVERRIDE all proxy configuration in ~/.gitconfig or any other gitconfig. By using it to configure, it was breaking havoc on site git configuration or the one generated by bitbake in tmp/. Renamed to OE_GIT_PROXY_COMMAND in meta/conf/site.conf.sample (with a doc tidbit on the name chosen), meta/classes/base.bbclass. - The gitconfig generated by bitbake was wrong. There was a typo error (gitproxy vs gitProxy), thus all lines were being ignored. Fixed in meta/classes/base.bbclass. - The gitconfig generated was being placed in ${STAGING_DIR_NATIVE}/usr/etc/gitconfig; git was looking for it in ${STAGING_DIR_NATIVE}/etc/gitconfig. Fixed that in meta/classes/base.bbclass, at the same time creating a GIT_CONFIG_PATH variable, since it is also referenced in generate_git_config() and have all instances refer to that. Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-22base.bbclass: check all entries of FILESPATH for MACHINE overridesJoshua Lock
The logic which looks for MACHINE overrides in SRC_URI and updates PACKAGE_ARCH was checking only certain subdirectories of the recipes parent which, amongst other issues, doesn't account for SRC_URI overrides in layers. This patch changes the logic such that all FILESPATH entries are checked for children named for MACHINE. Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-24base.bbclass: replace COMMERCIAL_LICENSE code with LICENSE_FLAGS codeTom Zanussi
The COMMERCIAL_LICENSE mechanism has been superseded by LICENSE_FLAGS so remove the code that implements COMMERCIAL_LICENSE and replace it with the corresponding LICENSE_FLAGS version. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
2012-01-23lib/oe: Add sstatesig, OE specific signature generator classesRichard Purdie
This patch adds SignatureGenerator classes specific to OE. For now, these emulate the previous behaviour with the exception that dependencies on quilt-native are now ignored for checksum purposes. The intent is to allow easier experimentation and customisation of this code in future as a result of these changes. Note that these changes require pending bitbake patches. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-17classes/base: note variable name in COMPATIBLE_* skip messagesPaul Eggleton
When raising SkipPackage for COMPATIBLE_MACHINE and COMPATIBLE_HOST exceptions, include the name of the variable as a hint to the user. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2012-01-10license.bbclass base.bbclass: support for 'or' operand in LICENSE and for ↵Andrei Gherzan
SPDX license names A new function was defined in license.bbclass in order to correctly exclude packages where OE-Style licence naming is used. In this way licenses as GPL-3, GPLv3, GPLv3.0 etc will be excluded from a non-GPLv3 build. This function takes into consideration if 'or' operand is used. The function defined in license.bbclass is called in base.bbclass where packages are excluded based on INCOMPATIBLE_LICENSE variable. [YOCTO #1884] [YOCTO #1844] Signed-off-by: Andrei Gherzan <andrei at gherzan.ro> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-02base.bbclass: Allow buildstats to be optionally suppliedMark Hatle
Buildstats should be allowed to be optionally enabled. It's recommended that it be enabled via the USER_CLASSES setting. Alternatively it could be enabled via the INHERIT_DISTRO or similar mechanism. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-12-05bitbake.conf: add default PRINC 0 to be able to increment itMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-01classes/base: split out metadata revision code to separate functionPaul Eggleton
Split out a new function get_layers_branch_rev() which returns a list of the metadata layers and their revisions. This enables reuse in other places, such as buildhistory.bbclass. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-11-26getVar/setVar cleanupsRichard Purdie
Complete the bb.data.getVar/setVar replacements with accesses directly to the data store object. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-24base.bbclass: Use bb.plain to print the build headerRichard Purdie
If we just use print, the bitbake logging functions don't see the message and it can get lost if bitbake is for example logging messages to disk. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-15base.bbclass: add subversion-native to DEPENDS if there is svn:// in SRC_URIMartin Jansa
* in some cases this could cause circual dependency (ie if we decide to apr_svn.bb or something like that before subversion-native in dependency tree), Saul said he had such case, but I wasn't able to reproduce it here (here it builds subversion-native-1.7.0 fine). Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie
This is the result of running the following over the metadata: sed \ -e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \ -e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-06base.bbclass: Implement PACKAGECONFIGRichard Purdie
These enabled options to be specified in the form: PACKAGECONFIG ?? = "<default options>" PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends" So that DEPENDS, RDEPENDS_${PN} and EXTRA_OECONF can be automatically built from specific options. Those options can easily be customised by the distro config or the user. Based on some ideas from Chris Elston <celston@katalix.com> but with an improved easier to use one line interface. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-06base.bbclass: Minor cleanupRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-30base.bbclass: Drop unneeded dependencyRichard Purdie
patch depends on unpack configure depends on patch We simply don't need a configure dependency on unpack. This simplifies the dependencies of every recipe slightly and should make bitbake slightly faster at resovling dependency graphs. It also makes the .dot dependency graphs slightly more readable by removing noise. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-26base.bbclass: Drop legacy code that is no longer useful/usedRichard Purdie
The code displaying console events has been handled by the bitbake UI since 1.8 so the legacy code path can be removed. If a log event is wanted, there are much better (and more complete) ways to do this so remove the EVENTLOG code too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-16base.bbclass: add crosssdk items to INCOMPATIBLE_LICENSE exclude listSaul Wold
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-09-13base.bbclass: do not expand PREFERRED_PROVIDER for kernel recipeDongxiao Xu
With Richard's commit f9c36392, we only build one kernel for a system, thus we shouldn't extend PREFERRED_PROVIDER for virtual/kernel. [YOCTO #1471] Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-08base.bbclass: fix substring matching in COMMERCIAL_LICENSEPaul Eggleton
Previously, if for example you had a package called "mx", and a second package called "libomxil" listed in COMMERCIAL_LICENSE (without mx being listed there), it would match mx as being commercially licensed because mx is a substring of libomxil. Fix the search to ensure it only matches the listed package name exactly. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-23base.bbclass: clarify COMMERCIAL_LICENSE skip reasonPaul Eggleton
Change to a proper sentence and add a reference to the COMMERCIAL_LICENSE variable so that the user knows where this can be controlled. Addresses remainder of [YOCTO #846] Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2011-08-09base.bbclass: Add MULTI_PROVIDER_WHITELIST manipulation for multilibRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-09base.bbclass: Ensure PREFERRED_PROVIDER and PREFERRED_VERSION values are set ↵Richard Purdie
for multilibs Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27base bbclass: add TUNE_FEATURES to the default bannerKoen Kooi
This makes debugging the new tune code easier since it doesn't involve staring at 'bitbake -e' output anymore. Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27base.bbclass: Fix PACKAGE_ARCH typoRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27base.bbclass: Add compatibility package name mapping handlerRichard Purdie
This means if PKGARCHCOMPAT_ARMV7A is set, "armv7a-vfp-neon" is renamed to be "armv7a". Other compatibility mappings can be added as needed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-19Fixed concurrency problem for ZIP packed recipes.Ihar Hrachyshka
The problem occured when unzip-native is not yet staged, and ZIP archive unpacking already started resulting in failed do_unpack task. (oe.dev has a NEED_UNZIP_FOR_UNPACK variable we did not bring over) [RP: Use srcuri from already existing variable] Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com> Signed-off-by: Koen Kooi <koen@openembedded.org> Signed-off-by: Tom Rini <tom_rini@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-19sanity, base: remove gcc3 check since qemu doesn't need it any morePhil Blundell
Recent versions of qemu seem to be happy enough building with gcc 4.x, and indeed most modern distributions aren't shipping gcc3 any more, so there is no point checking for its presence as part of sanity. Also remove the check_gcc3 function from base since nothing else uses it. Signed-off-by: Phil Blundell <philb@gnu.org>
2011-07-05base.bbclass: show layer's branches/revisions in the banner infoDexuan Cui
The patch removes METADATA_BRANCH and METADATA_REVISION, and treats the meta/ in the same way as other layers. In the case some layers belonging to the same repo, the branch and revision are only printed once, but all the layer names are still printed. An example output can be: OE Build Configuration: BB_VERSION = "1.13.1" TARGET_ARCH = "i586" TARGET_OS = "linux" MACHINE = "emenlow" DISTRO = "poky" DISTRO_VERSION = "1.0+snapshot-20110702" TARGET_FPU = "" meta meta-yocto = "dcui/banner_v3:4b712dba68a98c827b8f3d0242da9153c4f65473" meta-emenlow meta-sugarbay meta-n450 = "dcui/test1:76d1178ba1a43cf6457c89717134aeb9f1275fae" Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2011-06-30ccache: Set CCACHE on a per recipe basisWenzong Fan
Set 'CCACHE_DIR' in 'bitbake.conf' and create the dirs for every package before task 'do_configure' started. [RP: Merge dirs variables into one] Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-30Add umask task controlMark Hatle
Bitbake now allows the umask to be specified per task. The following tasks will have a umask of 022 set by default: do_configure do_compile do_install do_package do_populate_sysroot do_rootfs do_configure and do_compile need a umask of 022 set because -many- recipes directly copy generated files out of recipe's build directory. Instead of fixing each existing and future recipe, it was shown to be much easier to just set the umask. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-06-28base.bbclass: Back off the fatal error to a warning for now and try and recoverRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-28base/glib-2.0: Simplify USE_NLS handling for glib-2.0Richard Purdie
Currently the only way to get anything to build is to set USE_NLS="yes" for glib-2.0. We might as well do this in the recipe by default for now and simpllify the code. The magic handling of USE_NLS_<recipename> is also removed since this can be done in the form USE_NLS_pn-<recipename> using overrides these days. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-28classes/conf: Drop MULTIMACH_ARCH variable, it adds unused complexity and ↵Richard Purdie
serves no useful purpose Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>