aboutsummaryrefslogtreecommitdiffstats
path: root/classes/base.bbclass
AgeCommit message (Collapse)Author
2011-02-09More sane naming for the variable typing codeChris Larson
oe.types.value -> oe.data.typed_value This name has been bugging me. This function is the primary interface to the module for OE metadata, as it takes a variable name and datastore and returns an object of the correct type. While this function is part of the variable typing implementation, in reality it's more about giving you a useful object from the metadata, so I think oe.data is a more appropriate place for it. oe.types -> oe.maketype These are the functions which construct types, not the types themselves, so it was somewhat misleading. oe._types -> oe.types These are the actual types, any callable in this module becomes an OE type, using its arguments to determine the variable flags (optional and required) to obey. Will use __init__'s args in the case of an actual python class. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-01-29base.bbclass: Update build_summary for bitbake 1.8.xTom Rini
bitbake 1.8.x has a broken bb.plain. This means that our build simply blows up before we can tell the user to upgrade to BB_MIN_VERSION. Reported by Christian Poessinger. Signed-off-by: Tom Rini <tom_rini@mentor.com>
2011-01-26Add install wrapper rather than coreutils-nativeChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Eric Bénard <eric@eukrea.com> Acked-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-01-26Move stage-manager-* into bin/ rather than a recipeChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Eric Bénard <eric@eukrea.com>
2011-01-15unpack.py: add SRC_URI parameter unpack=<bool> (default: true)Andreas Oberritter
* This allows to download compressed files without extracting them * Use case: gcj requires ecj.jar, which must be downloaded separately and put into the gcc source directory before configure gets executed. Signed-off-by: Andreas Oberritter <obi@opendreambox.org> CC: Chris Larson <chris_larson@mentor.com> Reviewed-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-12-28base: start leveraging oe.typesChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-12-28Add flags for variable typingChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-12-16base: resurrect messages for bitbake 1.8Chris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-12-13base.bbclass: Get rid of "WARNING: Function do_build doesn't exist"Bob Foerster
Signed-off-by: Bob Foerster <robert@erafx.com> Acked-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-12-10base: use bb.plain, not print for build_summaryChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-11-22handle PACKAGE_ARCH change in an amend.incEric Bénard
* setting PACKAGE_ARCH = "${MACHINE_ARCH}" in an amend.inc actually leads to a package with the correct machine arch but the work/stage/stamp dirs are not correct because MULTIMACH_ARCH is not updated after amend.inc is parsed. * this patch : - factorizes the code which compute MULTIMACH_ARCH in base.bbclass - updates MULTIMACH_ARCH if required by an amend.inc Signed-off-by: Eric Bénard <eric@eukrea.com> Acked-by: Chris Larson <chris_larson@mentor.com> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Denys Dmytriyenko <denis@denix.org>
2010-11-04base.bbclass: rename base_eventhandler to build_summaryChris Larson
This better reflects what the event handler is doing -- it's no longer a pile of random base event handling bits, it now just displays a build summary at build start. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-11-02base.bbclass: fix build error if building with bitbake 1.8.xDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
2010-10-27base: drop rebuild, fix eventhandlerChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-10-26Handle .lz/.tar.lz URIsChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-10-20base.bbclass: depend on mercurial-native if SRC_URI contains hg://Eric BENARD
Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-10-09oe.packagegroup: add code for package groupsChris Larson
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>
2010-09-27base.bbclass: not use bb.fetch.urldata in do_unpack() for traversing SRC_URIsDenys Dmytriyenko
bb.fetch.urldata contains cached SRC_URIs, but in case SRC_URI is altered by amend.inc or machine override, the original SRC_URI is not removed from the cache, leading to calling do_unpack() multiple times on original and modified versions of the file. Don't rely on bb.fetch.urldata and traverse SRC_URIs directly. Some background and details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/36703 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Chris Larson <chris_larson@mentor.com> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-09-12base.bbclass: fix soc-family testFrans Meulenbroeks
for now pushed this patch as it fixes the breakage. If it is decided not to have SOC_FAMILY we can always revert or overwrite see http://lists.linuxtogo.org/pipermail/openembedded-devel/2010-September/023680.html Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Acked-by: Chase Maupin <chase.maupin@ti.com> and got a looks good from Phil.
2010-09-10Fix unpack issue with bitbake 1.10Chris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-09-09Per the TSC decision, make packaged-staging defaultChris Larson
For now, just ensures its inherited. In the future, we can merge / simplify staging.bbclass with packaged-staging.bbclass as appropriate. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-09-02do_unpack, do_patch: shift some responsibility around, clean things upChris Larson
- Consolidate 'is this file a patch' logic - Move unpack functions from classes into oe.unpack - Move the unpacking message printing into do_unpack - Move the destination directory determination into do_unpack - Use subprocess's ability to pass in PATH and cwd rather than mangling the cmd - Use shutil.copy2/copytree for ordinary file "unpack" - Use the existing urldata from bb.fetch.init rather than re-decodeurl'ing the urls - Make handling of globs in url paths explicit rather than implicit, calling oe_unpack on each one, so showing an unpacking message to the user for each globbed file, rather than the entirety Signed-off-by: Chris Larson <chris_larson@mentor.com> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Tom Rini <tom_rini@mentor.com>
2010-08-31base.bbclass: fix bug with absolute file:// urisChris Larson
The code which used host/path from the url to construct the destination of the copy was using os.path.join. os.path.join treats a "/" in an element as an indication to drop all previous elements, so the full path resulted in a destination exactly the same as the source, resulting in a no-op unpack. Fixed by using oe.path.join instead. The previous fix missed two instances of os.path.join -- there's code duplication in oe_unpack_file, really need to resurrect my do_unpack cleanup branch. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-08-31Revert "base.bbclass: fix bug with absolute file:// uris"Chris Larson
Drop this for now, as it breaks other things. Of course, without this, you once again can no longer have absolute file:// paths the way we used to be able to. Will look into it further. This reverts commit 599b03fe999d41114d124ce663b6c59fa57256d8.
2010-08-30base.bbclass: fix bug with absolute file:// urisChris Larson
The code which used host/path from the url to construct the destination of the copy was using os.path.join. os.path.join treats a "/" in an element as an indication to drop all previous elements, so the full path resulted in a destination exactly the same as the source, resulting in a no-op unpack. Fixed by using oe.path.join instead. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-08-23base: use a variable for the modules to import/injectChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-08-23Revert "base: use a variable for the modules to import/inject"Chris Larson
This reverts commit 5678affd4e1b6453d6802b8cfb7823fec6f47269.
2010-08-23base: use a variable for the modules to import/injectChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-08-20Fix the package_arch=machine_arch logic to use FILESPATH*Chris Larson
- Use FILESPATHPKG and FILESPATHBASE to locate the machine specific dirs - Use the fetch urldata rather than poking at urls ourselves - Move the logic into utils.bbclass as def'd python functions - Simplify Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-08-04base.bbclass: add support for SOC_FAMILY in COMPATIBLE_MACHINESChase Maupin
* 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 Signed-off-by: Chase Maupin <chase.maupin@ti.com> Acked-by: Denys Dmytriyenko <denys@ti.com> Acked-by: Koen Kooi <k-kooi@ti.com> Signed-off-by: Koen Kooi <koen@openembedded.org>
2010-07-20base.bbclass: base_do_compile() accepts GNUmakefile as MakefileVitus Jensen
GNU make will look for GNUmakefile, makefile and Makefile. GNUmakefile isn't recommended but used by some programs, e.g. canutils. Signed-off-by: Vitus Jensen <vjensen@gmx.de> Acked-by: Chris Larson <chris_larson@mentor.com> Acked-by: Denys Dmytriyenko <denis@denix.org> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2010-07-14base.bbclass: introduce COMPATIBLE_TARGET_SYSFrans Meulenbroeks
This patch introduces COMPATIBLE_TARGET_SYS It is similar to COMPATIBLE_MACHINE but where COMPATIBLE_MACHINE is used to specify that a certain recipe is for a certain machine COMPATIBLE_TARGET_SYS can be used to specify that a certain recipe is for a certain architecture. Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Acked-by: Tom Rini <tom_rini@mentor.com>
2010-07-07base.bbclass: re-add backward compatibility with bitbake w.r.t decodeurl fix ↵Khem Raj
in bitbake Signed-off-by: Khem Raj <raj.khem@gmail.com> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
2010-07-05base.bbclass: Fix oe_unpack_file to unpack files to match new bitbake ↵Khem Raj
bb.decodeurl() * This patch now uses the path which essentially is the path and filename relative to recipe dir. It will create the directories as expected. Suppose if the is says file://pam.d/login in the SRC_URI then it will be copied to $WORKDIR/pam.d/login as it was happening before the fix to decodeurl in bitbake. * Do not copy the .patch and .diff files into $WORKDIR they are already symlinked in patches/ dir which will be used by quilt. Signed-off-by: Khem Raj <raj.khem@gmail.com> Acked-by: Roman I Khimov <khimov@altell.ru> Acked-by: Chris Larson <clarson@kergoth.com>
2010-06-24Rename base_dep_prepend and autotools_dep_prependChris Larson
When we start including methodpool funcs in the metadata, these blow up, since the _prepend gets evaluated at finalize time. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-06-16linux-libc-headers-native: Add, make it a dependency for most native recipesTom Rini
On some host distributions the provided linux kernel headers are too old to compile utilities we need. Given that we need these utilities to run things on the target the best solution is to provide linux-libc-headers-native. Rather than get things into an inconsistent state, we make linux-libc-headers-native be a default dependency. Acked-by: Leon Woestenberg <leon@sidebranch.com> Signed-off-by: Tom Rini <tom_rini@mentor.com>
2010-05-27base.bbclass: fix issue with unpack of patches with apply=noChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-05-27Revert "base.bbclass: fixed 'apply=no' behavior"Chris Larson
This reverts commit eb8ad2af3a59dc7b4c64814815fc13977efaec6b.
2010-05-27base.bbclass: fixed 'apply=no' behaviorEnrico Scholz
After the recent change to autodetect patchfiles in SRC_URI's, files with 'apply=no' were not copied to workdir anymore. This broke e.g. dropbear which marks a patch as 'apply=no' and applies it manually. This patch evaluates content of 'apply' parameter and copies files to workdir when it is not a patch or the parameter is false. Slightly altered to use oe.utils -kergoth Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-05-26base.bbclass: make do_unpack also not unpack when 'apply' url parameter is setChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-05-05bitbake.conf/base.bbclass: Rename the staging directory to sysroots and the ↵Joshua Lock
populate_staging task to populate_sysroot This change, pulled from Poky, makes the purpose of the staging directory more obvious and the taskname more true to what it now actually does. The layout version number is increased due to the change in layout but code to convert existing directories and insert a symlink for backwards compatibility is included. This patch also includes fixes for all recipes which reference the directory. Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-05-05base.bbclass: Stage etc directory for native packages and add a ↵Richard Purdie
use_do_install_for_stage special staging hint (from poky) Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-05-05base.bbclass: Remove pointless data expand call (from Poky)Richard Purdie
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-04-25Revert "do_unpack: shift some responsibility around, clean things up"Chris Larson
Revert "base.bbclass: unbork oe_unpack_file" I give up. Will revisit later, after more testing, and after removing the unnecessary glob usages in SRC_UR in the metadata. This reverts commit 5c8bfd6873939024d57278343035cfab0257bdb3. This reverts commit 757ec3d76d258c15828de2d85dd8ce9abb4c1323.
2010-04-24base.bbclass: unbork oe_unpack_fileChris Larson
I accidentally messed up the merge, sorry about that. Signed-off-by: Chris Larson <clarson@kergoth.com>
2010-04-23Initial move of common python bits into modules of the 'oe' python packageChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-23base.bbclass: add <dir>/lib for each dir in BBPATH to the python search pathChris Larson
Also makes the os, time, and bb package availability explicit. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-23do_unpack: shift some responsibility around, clean things upChris Larson
- Move the unpacking message printing into do_unpack - Move the destination directory determination into do_unpack - Use subprocess's ability to pass in PATH and cwd rather than mangling the cmd - Use shutil.copy2/copytree for ordinary file "unpack" - Use the existing urldata from bb.fetch.init rather than re-decodeurl'ing the urls - Only display the unpack destdir to the user when debugging is enabled, as we all know they unpack into WORKDIR Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-22Use the python modules for checksum generation where we canChris Larson
Based on df32920678d15c86897b50b752b937210a01edea. Signed-off-by: Chris Larson <chris_larson@mentor.com> Tested-by: Khem Raj <raj.khem@gmail.com> Acked-by: Khem Raj <raj.khem@gmail.com>
2010-04-12utils.bbclass: simplify checksum check, prepare for checksums.ini removalMartin Jansa
* show note, when there are checksums only in checksums.ini (prepare for script for moving all to recipes) * parse checksums.ini only when there is no checksum in recipe (could be faster, but for more checked items in SRC_URI it is parsed repeatedly) * if one checksum doesn't match then count and show both (md5 as well as sha256) - usefull for copy&paste checksums for new recipe. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>