summaryrefslogtreecommitdiff
path: root/meta/classes/base.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* base.bbclass: use isinstance for base_eventhandlerChristopher Larson2012-05-031-10/+6
| | | | Signed-off-by: Christopher Larson <kergoth@gmail.com>
* bitbake.conf: shift build config summary control to hereChristopher Larson2012-05-031-16/+34
| | | | Signed-off-by: Christopher Larson <kergoth@gmail.com>
* classes: Add recipe class to overridesRichard Purdie2012-04-261-0/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* base.bbclass: Fix PACKAGECONFIG issues with native and nativesdk ↵Richard Purdie2012-04-131-5/+31
| | | | | | | | | | | | | | | | | | | | | | | 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>
* INCOMPATIBLE_LICENSE: support for spdx and pkg licensesElizabeth Flanagan2012-03-251-7/+33
| | | | | | | | | | | | | | | | 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>
* base.bbclass: Fix PACKAGECONFIG handling when no flags are setRichard Purdie2012-03-051-3/+4
| | | | | | | | | 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>
* meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)Richard Purdie2012-03-051-2/+2
| | | | | | | | sed \ -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data.expand *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)Richard Purdie2012-03-051-21/+21
| | | | | | | | | | | | 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>
* meta/classes: Convert to use appendVar and appendVarFlagsRichard Purdie2012-03-051-27/+9
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: If unpacking again, wipe out ${S}/patchesRichard Purdie2012-03-021-0/+1
| | | | | | | | | | | | | 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>
* site.conf.sample: Fix broken SOCKS proxy setup and configurationInaky Perez-Gonzalez2012-03-011-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* base.bbclass: check all entries of FILESPATH for MACHINE overridesJoshua Lock2012-02-221-6/+8
| | | | | | | | | | | | 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>
* base.bbclass: replace COMMERCIAL_LICENSE code with LICENSE_FLAGS codeTom Zanussi2012-01-241-6/+6
| | | | | | | | 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>
* lib/oe: Add sstatesig, OE specific signature generator classesRichard Purdie2012-01-231-1/+1
| | | | | | | | | | | | | 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>
* classes/base: note variable name in COMPATIBLE_* skip messagesPaul Eggleton2012-01-171-2/+2
| | | | | | | 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>
* license.bbclass base.bbclass: support for 'or' operand in LICENSE and for ↵Andrei Gherzan2012-01-101-2/+1
| | | | | | | | | | | | | | | | 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>
* base.bbclass: Allow buildstats to be optionally suppliedMark Hatle2012-01-021-1/+0
| | | | | | | | | | 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>
* bitbake.conf: add default PRINC 0 to be able to increment itMartin Jansa2011-12-051-1/+1
| | | | | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/base: split out metadata revision code to separate functionPaul Eggleton2011-12-011-20/+24
| | | | | | | | 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>
* getVar/setVar cleanupsRichard Purdie2011-11-261-2/+2
| | | | | | | Complete the bb.data.getVar/setVar replacements with accesses directly to the data store object. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Use bb.plain to print the build headerRichard Purdie2011-11-241-1/+1
| | | | | | | 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>
* base.bbclass: add subversion-native to DEPENDS if there is svn:// in SRC_URIMartin Jansa2011-11-151-1/+7
| | | | | | | | | | * 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>
* Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie2011-11-101-57/+57
| | | | | | | | | | | | | | | 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>
* base.bbclass: Implement PACKAGECONFIGRichard Purdie2011-10-061-0/+38
| | | | | | | | | | | | | | | | 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>
* base.bbclass: Minor cleanupRichard Purdie2011-10-061-5/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Drop unneeded dependencyRichard Purdie2011-09-301-1/+1
| | | | | | | | | | | | | | 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>
* base.bbclass: Drop legacy code that is no longer useful/usedRichard Purdie2011-09-261-30/+0
| | | | | | | | | 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>
* base.bbclass: add crosssdk items to INCOMPATIBLE_LICENSE exclude listSaul Wold2011-09-161-1/+1
| | | | Signed-off-by: Saul Wold <sgw@linux.intel.com>
* base.bbclass: do not expand PREFERRED_PROVIDER for kernel recipeDongxiao Xu2011-09-131-1/+3
| | | | | | | | | | 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>
* base.bbclass: fix substring matching in COMMERCIAL_LICENSEPaul Eggleton2011-09-081-2/+2
| | | | | | | | | | | 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>
* base.bbclass: clarify COMMERCIAL_LICENSE skip reasonPaul Eggleton2011-08-231-1/+1
| | | | | | | | | | 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>
* base.bbclass: Add MULTI_PROVIDER_WHITELIST manipulation for multilibRichard Purdie2011-08-091-0/+14
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Ensure PREFERRED_PROVIDER and PREFERRED_VERSION values are set ↵Richard Purdie2011-08-091-0/+45
| | | | | | for multilibs Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base bbclass: add TUNE_FEATURES to the default bannerKoen Kooi2011-07-271-1/+1
| | | | | | | 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>
* base.bbclass: Fix PACKAGE_ARCH typoRichard Purdie2011-07-271-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Add compatibility package name mapping handlerRichard Purdie2011-07-271-0/+8
| | | | | | | 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>
* Fixed concurrency problem for ZIP packed recipes.Ihar Hrachyshka2011-07-191-0/+6
| | | | | | | | | | | | | 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>
* sanity, base: remove gcc3 check since qemu doesn't need it any morePhil Blundell2011-07-191-10/+0
| | | | | | | | 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>
* base.bbclass: show layer's branches/revisions in the banner infoDexuan Cui2011-07-051-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ccache: Set CCACHE on a per recipe basisWenzong Fan2011-06-301-1/+1
| | | | | | | | | 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>
* Add umask task controlMark Hatle2011-06-301-0/+4
| | | | | | | | | | | | | | | | | | | 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>
* base.bbclass: Back off the fatal error to a warning for now and try and recoverRichard Purdie2011-06-281-1/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/glib-2.0: Simplify USE_NLS handling for glib-2.0Richard Purdie2011-06-281-4/+0
| | | | | | | | | | | | 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>
* classes/conf: Drop MULTIMACH_ARCH variable, it adds unused complexity and ↵Richard Purdie2011-06-281-7/+1
| | | | | | serves no useful purpose Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Since we require python 2.6 which always contains hashlib we ↵Richard Purdie2011-06-281-10/+0
| | | | | | can drop this fallback code Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Drop old style SRCDATE handling, we have pn- overrides nowRichard Purdie2011-06-281-5/+0
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* native/nativesdk: Clean up the depends ordering after bitbake override ↵Richard Purdie2011-06-091-2/+0
| | | | | | | | | | | | handling updates This massively cleans up the dependency handling in the two classes when interacting with BBCLASSEXTEND. This change has a dependency on the bitbake override handling change and also the existence of the RecipePreFinalise event. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: add cleansstate task between clean and cleanallMartin Jansa2011-06-061-2/+5
| | | | | | * sometimes it's usefull to remove only sstate cache and keep downloaded sources for rebuild Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* oe.packagegroup: add code for package groups (sync from OE)Chris Larson2011-05-201-1/+1
| | | | | | | | | | | | | This includes some utility functions for dealing with groups of packages defined in the metadata. Metadata syntax: PACKAGE_GROUP_<group> = "<list of packages>" If the packages in the group are optional: PACKAGE_GROUP_<group>[optional] = "1" Signed-off-by: Chris Larson <chris_larson@mentor.com>
* base.bbclass: use oe.data for OE_IMPORTSChris Larson2011-05-201-1/+3
| | | | Signed-off-by: Chris Larson <chris_larson@mentor.com>