aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
AgeCommit message (Collapse)Author
2011-05-18base.bbclass: use oe.data for OE_IMPORTSkergoth/oe-sync-baseChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-18Shift oe import logic out of the event handlerChris Larson
This can be useful if we need the imports from another config parsed event handler, and can't rely upon the base one running before that one. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-18base.bbclass: switch to current OE's imports handlingChris Larson
The current mechanism makes it easier for classes to add new oe modules to be automatically imported, and thereby made available to python snippets (${@}). Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-18Implement variable typing (sync from OE)Chris Larson
This implementation consists of two components: - Type creation python modules, whose job it is to construct objects of the defined type for a given variable in the metadata - typecheck.bbclass, which iterates over all configuration variables with a type defined and uses oe.types to check the validity of the values This gives us a few benefits: - Automatic sanity checking of all configuration variables with a defined type - Avoid duplicating the "how do I make use of the value of this variable" logic between its users. For variables like PATH, this is simply a split(), for boolean variables, the duplication can result in confusing, or even mismatched semantics (is this 0/1, empty/nonempty, what?) - Make it easier to create a configuration UI, as the type information could be used to provide a better interface than a text edit box (e.g checkbox for 'boolean', dropdown for 'choice') This functionality is entirely opt-in right now. To enable the configuration variable type checking, simply INHERIT += "typecheck". Example of a failing type check: BAZ = "foo" BAZ[type] = "boolean" $ bitbake -p FATAL: BAZ: Invalid boolean value 'foo' $ Examples of leveraging oe.types in a python snippet: PACKAGES[type] = "list" python () { import oe.data for pkg in oe.data.typed_value("PACKAGES", d): bb.note("package: %s" % pkg) } LIBTOOL_HAS_SYSROOT = "yes" LIBTOOL_HAS_SYSROOT[type] = "boolean" python () { import oe.data assert(oe.data.typed_value("LIBTOOL_HAS_SYSROOT", d) == True) } Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-05-17base.bbclass: Fix PR increment bug when PR number is a single digitKhem Raj
PRINC which should add to base PR value has a problem when the PR is single digit e.g. r0 - r9. Current algorithm needed atleasts 2 digits to successfully populate end and begin markers. We reimplement the incrementing algorithm using regular expressions which addressed the above mentioned problem and simplifies the logic a bit and gets rid of loops and conditionals Signed-off-by: Khem Raj <raj.khem@gmail.com>
2011-05-04logging: delete the oe(note|warn|fatal|debug) functionsDarren Hart
The new logging.bbclass replaces the oe* logging functions with bb* equivalents. There are no longer any users of the oe* API within oe-core. Remove the oe* functions. Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2011-05-04logging: update existing oe* logging users to the bb* interfaceDarren Hart
The new bash logging class provides bbnote, bbwarn, bbfatal, and bbdebug replacements (as well as bbplain and bberror) for the oe* equivalents. Use the new bb* API in preparation to delete the oe* logging API. This patch was automatically generated by a sed script. The result has been visually inspected and used to build core-image-sato for qemux86. Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2011-05-04base.bbclass: Create a BASEDEPENDS variable other classes can use to add to ↵Richard Purdie
the base dependencies, avoiding native/nativesdk issues Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-28logging: add bb* logging mechanisms for bash recipe functionsDarren Hart
The following logging mechanisms are to be used in bash functions of recipes. They are intended to map one to one in intention and output format with the python recipe logging functions of a similar naming convention: bb.plain(), bb.note(), etc. For the time being, all of these print only to the task logs. Future enhancements may integrate these calls with the bitbake logging infrastructure, allowing for printing to the console as appropriate. The interface and intention statements reflect that future goal. Once it is in place, no changes will be necessary to recipes using these logging mechanisms. I opted to write new functions instead of modifying the oe* logging functions from base.bbclass (and utils.bbclass in oe) for a couple reasons. First, one of my goals was to generate a uniform logging API between bash and python in recipes. Second, there are no users of oe* logging in meta (oe-core) or meta-yocto, while several oe recipes do use them. I wanted to make a clean start with the freedom to change behavior without forcing the oe recipes to change or experience unexpected logging changes. Eventually, the oe recipes can be migrated to the new bb* logging routines and the existing oe* routines can be retired (deleted). Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: Chris Larson <clarson@kergoth.com>
2011-04-28logging: fix oedebug loglevel testDarren Hart
When the existing test for loglevel fails, the syntax used results in the recipe exiting with a silent failure. Performing any bash command after the test block resolves the problem, such as "shift" or "echo ''". Rewriting with 'if []; then' blocks provides a cleaner syntax and also resolves the failure. Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2011-03-29base/kernel/image.bbclass: Clean up do_deploy ordering to ensure it just ↵Richard Purdie
happens before a build completes Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-01base.bbclass: add support for SOC_FAMILY in COMPATIBLE_MACHINESKoen Kooi
* Add support for using SOC_FAMILY in the COMPATIBLE_MACHINES setting for a recipe. * This will allow recipes to work for entire families of devices without having to maintain/update the compatible devices as new devices are added into a family Based on 07076390358f211bd96779bec2d6eb5eaa0ad699 by Chase Maupin <chase.maupin@ti.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Khem Raj <raj.khem@gmail.com>
2011-03-01base/utility-tasks.bbclass: Drop do_setscene and do_rebuildRichard Purdie
The do_setscene task only exists for rebuild support now as all its other functionality has been superceeded. The rebuild task currently crashes due to removal of the working directory and therefore isn't working for anyone. It also interacts extremely badly with the newer sstate technology to the point of being dangerous. Summary, if we want rebuild support it needs a reimplementation so remove this version and all its remnants and hacks. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-15Buildstats commit: buildstats.bbclassBeth Flanagan
Used to track some basic build metrics by build and task/event level. Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
2011-02-10fetch2: Correct the clean() mechanism for the fetcher2 codeSaul Wold
This create a clean() method in each of the fetcher modules and correctly cleans the .done stamp file and lock files Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-02-07meta/classes: Update classes to use new fetcher APIRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-07base.bbclass: Update after fetcher changesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-25base/sstate.bbclass: Rename fetcher "go" method to "download" when using ↵Yu Ke
fetch v2 Signed-off-by: Yu Ke <ke.yu@intel.com>
2011-01-25base.bbclass: use bb.fetch2 unpack APIYu Ke
Signed-off-by: Yu Ke <ke.yu@intel.com>
2011-01-20base.bbclass: fix parse error on recipes with '++' in their namePaul Eggleton
Fixes "multiple repeat" or "nothing to repeat" errors when parsing recipes with '++' in the file name. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-01-06base.bbclass: Use the new stampfile function in bitbake to determine the ↵Richard Purdie
path to the stampfile Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-04base.bbclass: add lock file for do_unpack taskYu Ke
This patch intend to fix the random unpack failure of linux-libc-headers-yocto and linux-yocto. The root cause of the unpack failure is that: these two recpies has the same URL, thus has the same dest file during the fetch and unpack phase: do_fetch : create tar ball ${DL_DIR}/git_git.pokylinux.org.linux-yocto-2.6.37.tar.gz do_unpack : extract tar ball ${DL_DIR}/git_git.pokylinux.org.linux-yocto-2.6.37.tar.gz fetch phase is protected by lockfile, so it works fine. but unpack phase is not lock protected, thus there is race condition like: when linux-yocto do_unpack is extracting the tar ball, linux-libc-headers-yocto do_fetch starts to create tar ball thus overwrite linux-yocto's tar ball and cause linux-yocto do_unpack failure To fix this issue, do_unpack also need to be protected by lock Signed-off-by: Yu Ke <ke.yu@intel.com>
2010-12-31base.bbclass: Add error message for base_do_unpack failuresRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-31base.bbclass: Correct bb.debug parametersRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-20base/utils.bbclass: Drop former checksum code now bitbake is handling this ↵Richard Purdie
for us Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-14base.bbclass/poky.conf: Fix INCOMPATIBLE_LICENSE Whitelist checkingSaul Wold
Signed-off-by: Saul Wold <Saul.Wold@intel.com>
2010-11-06meta/classes: Mark do_package_write and do_build as noexec tasksRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-02base/utils.bbclass: Sync up overlapping functionsRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22classes: Only enable fakeroot on setscene tasks with packagingRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22pseudo/fakeroot: Move the pseudo directory creation into bitbakeRichard Purdie
If sstate was used to accelerate a build, the pseudo directory might not have been created leading to subsequent task failures. Also, sstate packages were not being installed under pseudo context meaning file permissions could have been lost. Fix these problems by creating a FAKEROOTDIRS variable which bitbake ensures exists before running tasks and running the appropriate setscene tasks under fakeroot context. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22base.bbclass: Ensure an empty do_build tasks exists to silence a warningRichard Purdie
The message "WARNING: Function do_build doesn't exist" doesn't look professional, so fix the underlying problem even if this warning is harmless. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22base/sstate: Add cleanall task to remove downloads and sstate cached filesRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-09base.bbclass: Fix spelling mistakes and change log levelRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-08base.bbclass: add support for commercial license checkSaul Wold
This addresses [BUGID #410], require implict action by someone to enable functionality that may have license implications. By default this diables mp3 and mpeg decoding Signed-off-by: Saul Wold <Saul.Wold@intel.com>
2010-10-05base.bbclass: Implement PRINC, a way to increment the PR variable in ↵Richard Purdie
.bbappend files Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-05Improve FILESPATH usage in .bbappend recipesRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-30Make invalid LICENSE fields fatalRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-31meta/classes: Fix whitespace mismatch and broken functionsRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-27base.bbclass: Add xz-native as depends when finding *.xz in SRCURIZhai Edwin
Just adding xz-native as DEPENDS in one bb file could not make its unpack run after xz-native build done. Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
2010-08-20base.bbclass: Initial work to add GPLv2 Only Build with Whitelist for GPLv3 ↵Saul Wold
Native tools [tweaks from Richard Purdie] Signed-off-by: Saul Wold <Saul.Wold@intel.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-19Revert "base.bbclass: Temporarily disable fakeroot for install/package until ↵Richard Purdie
other fixes get merged" This reverts commit 2225e1214285f0e9a3c0ee2962b3d678c5c05292 and reenables the functionality now its safe to do so.
2010-08-19Remove packaged-staging.bbclassRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-17base.bbclass: Temporarily disable fakeroot for install/package until other ↵Richard Purdie
fixes get merged Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-13base: Allow unpack to handle localpath=NoneRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-04pseudo: Change pseudo integration to better support local DBsMark Hatle
Change the pseudo integration: * Uprev to latest open source version * Restructure the patches to allow for many local DBs, as well as pseudo specific lib dirs. Signed-off-by: Mark Hatle <mhatle@windriver.com>
2010-08-04base.bbclass: Enable fakeroot (pseudo) usage during install and packagingMark Hatle
Use the virtual fakeroot program when installing a package and also during packaging. This is important as it allows us to track full permissions, owners, groups and special files generated by packages. Signed-off-by: Mark Hatle <mhatle@windriver.com>
2010-07-24pseudo: EnhancementsJoshua Lock
Enable changing the data directory on the fly from the environment and then use this feature within poky to confine pseudo usage to each WORKDIR. This fixes issues that could be seen under heavy inode reusage e.g. with rm_work. Work based mainly off a patch from Joshua Lock but finished by Richard Purdie. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-06-07base.bbclass: Fix after bb.decodeurl was fixedRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-05-06Update classes to use lib/oeJoshua Lock
Adapt modifications from upstream to make Poky classes use lib/oe for the common Python functionality. Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-05-06base.bbclass: Sync minor layout changes with OE.devRichard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>