summaryrefslogtreecommitdiff
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* Move packagedata code into oe.packagedata (sync from OE)Chris Larson2011-05-203-66/+9
| | | | Signed-off-by: Chris Larson <chris_larson@mentor.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>
* Shift oe import logic out of the event handlerChris Larson2011-05-201-15/+18
| | | | | | | 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>
* base.bbclass: switch to current OE's imports handlingChris Larson2011-05-201-13/+9
| | | | | | | 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>
* Implement variable typing (sync from OE)Chris Larson2011-05-202-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* kernel.bbclass: pass KERNEL_VERSION through legitimize_package_nameAndreas Oberritter2011-05-201-2/+2
| | | | | | | | | - KERNEL_VERSION may contain characters unsuitable for package names, e.g. underscores. Use legitimize_package_name to replace those characters. Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package-index.bb: add support for deb and rpm.Dexuan Cui2011-05-203-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [YOCTO #1024] Currently package-index.bb only supports ipk. This commit adds the support for rpm and deb, too. ------------------------------ How to generate and use repos: 1) run "bitbake package-index" after building some target, e.g., core-image-sato-sdk; 2) export ${DEPLOY_DIR_RPM}, ${DEPLOY_DIR_IPK} and ${DEPLOY_DIR_DEB} by a webserver on the host, assuming the host IP is 192.168.7.1, at http://192.168.7.1/rpm http://192.168.7.1/ipk http://192.168.7.1/deb 3) inside the target, according to the packaging system (rpm, ipk or deb) used when we generate the target image, we can use different ways to manage packages: 3.1) RPM run "zypper addrepo http://192.168.7.1/rpm main; zypper refresh" to retrieve info about the repo; next, we can use "zypper install/remove" to manage packages. 3.2) IPK add the repo info into opkg config file, i.e., in /etc/opkg/arch.conf, we can add something like "src i586 http://192.168.7.1/ipk/i586", and next, we run "opkg update" to make opkg update the list of available packages. And later, we can use "opkg install/remove" to manage packages. 3.3) DEB Currently in target, some important config files, like /var/lib/dpkg/status and /etc/apt/sources.list, for deb/apt are missing. So we can't install/remove package in target at present. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* utils.bbclass: modify create_wrapper to correctly follow symlinksSaul Wold2011-05-191-1/+2
| | | | | | This ensures you look up the symbolic link to get the full path Signed-off-by: Saul Wold <sgw@linux.intel.com>
* utils.bbclass: modify create_wrapper to correctly follow symlinksSaul Wold2011-05-191-1/+2
| | | | | | This ensures you look up the symbolic link to get the full path Signed-off-by: Saul Wold <sgw@linux.intel.com>
* Couple minor fixes for the OECORE renameJessica Zhang2011-05-181-3/+3
| | | | Signed-off-by: Jessica Zhang <jessica.zhang@intel.com>
* yaffs2: Remove yaffs2 from oe-coreSaul Wold2011-05-181-3/+0
| | | | | | | Move to meta-extras Also remove yaffs2 from image_types.bbclass Signed-off-by: Saul Wold <sgw@linux.intel.com>
* sanity.bbclass: Disable the is DISTRO set check since we can now run distro-lessRichard Purdie2011-05-181-2/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-prelink: remove hardcoded path assumptions, don't generate cache filePhil Blundell2011-05-171-8/+5
| | | | | | | | | Pass -N option to prelink so that no cache file is generated (obviates need for deleting it afterwards). Use symbolic names, ${sysconfdir} et al., rather than hardcoded paths. Pass explicit -c option to prelink in case ${sysconfdir} and ${sysconfdir_native} are different. Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* backport USE_LDCONFIG and PACKAGE_SNAP_LIB_SYMLINKS from oe masterPhil Blundell2011-05-171-7/+27
| | | | | | | This is a backport of the corresponding package.bbclass functionality (which is needed by micro) from the openembedded tree. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* task-core-nfs/image.bbclass: Fix some libc overridesRichard Purdie2011-05-171-2/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: use soft assignment for LDCONFIGDEPENDPhil Blundell2011-05-171-1/+1
| | | | | | | This allows distros that don't want ldconfig to turn it off. Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license bbclass: put licenses in DEPLOY_DIR/licenses to avoid sstate ↵Koen Kooi2011-05-171-1/+1
| | | | | | | | | problems when MACHINE is part of DEPLOY_DIR_IMAGE See http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/002535.html for more info. Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Fix PR increment bug when PR number is a single digitKhem Raj2011-05-171-13/+6
| | | | | | | | | | | | | 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>
* Add a new task checklicense and fix some bugs in distro_check.pyMei Lei2011-05-171-76/+101
| | | | | | | | | | | distro_check.py: Create a new function called create_log_file to reduce a lot of repeat code in distrodata.bbclass. We needn't to create log file in function save_distro_check_result, because the log file has been generated in check_eventhandler. Another bug is that we maybe access the /tmp/Meego-1.0 before we create this file. Add a judge statement to decide whether we need to create this file firstly. distrodata.bbclass: Add a new task checklicense to collect missing text license information. This can help package-report system to know how many recipes are missing license text. Signed-off-by: Mei Lei <lei.mei@intel.com>
* linux-yocto: detect and avoid branch revision checking for AUTOREVBruce Ashfield2011-05-171-0/+7
| | | | | | | | | | | | When a BSP or layer specifies an AUTOREV for SRCREV, the logic that matches expected vs real branch heads doesn't apply. We always want the latest. To solve the issues with invalid git revs causing validation failures, we detect the AUTOINC value and do a early return, skipping validation. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
* qmake_base.bbclass: add generate_qt_config_file taskOtavio Salvador2011-05-111-0/+14
| | | | | | | | | This writes a qt.conf inside WORKDIR to properly configure projects based on CMake. This is required since qmake variables (returned by -query command) are fixed into the binary and can only be changed using a qt.conf file. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
* cmake.bbclass: fix qmake and rpath issuesOtavio Salvador2011-05-112-2/+16
| | | | | | | | Sync with OE at 3b7d83362027fde4f6850533ab83277d95dda961 however without changing the way of generating the toolchain file and making it branding agnostic. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
* siteinfo.bbclass: Add powerpc-linux-gnuspe.Leon Woestenberg2011-05-111-0/+1
| | | | | | | | | Re-add powerpc-linux-gnuspe, from OpenEmbedded. Also adds support to poky.conf so that minimal-core-image builds with DISTRO=poky, [RP: Synced with recent diso file reoorg] Signed-off-by: Leon Woestenberg <leon@sidebranch.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* metadata_scm.bbclass: Use COREBASE to grok for SCM operationsKhem Raj2011-05-111-4/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* insane.bbclass: skip license checksum if LICENSE is "CLOSED"Otavio Salvador2011-05-101-0/+4
| | | | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
* linux-yocto: error if meta data not presentBruce Ashfield2011-05-101-1/+4
| | | | | | | | | | | | | | | | | There are valid reasons to build repositories without meta data present and there are times when this is an error. This change adds sanity tests to the build process to detect missing meta data and throw an informative error message. Sanity checking is only triggered from recipes (linux-yocto) that always require meta data to be present. Other recipes are not impacted and can auto-generate meta data as required. Without this change the build process suceeds, but incorrect meta data will be used (with no user knowledge), which is not the desired behaviour. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
* package_rpm: use target vendor informationAdrian Alonso2011-05-101-1/+2
| | | | | | | | * Instead of hardcoding target vendor string "-poky" use TARGET_VENDOR information in case of using external toolchains Signed-off-by: Adrian Alonso <aalonso@secretlab.ca>
* image-mklibs: add microblaze arch supportAdrian Alonso2011-05-101-1/+1
| | | | | | | | * In function mklibs_optimize_image_doit * Add microblaze arch case for setting the dynamic_loader used by "mklibs" call Signed-off-by: Adrian Alonso <aalonso@secretlab.ca>
* siteinfo: add microblaze target infoAdrian Alonso2011-05-101-0/+1
| | | | | | | | | * Add microblaze target info * Microblaze soft CPU can be configured as big-endian/little-endian * Currently target info support for microblaze big endian, using prebuilt toolchains. Signed-off-by: Adrian Alonso <aalonso@secretlab.ca>
* kernel-arch: add microblaze to valid archsAdrian Alonso2011-05-101-1/+2
| | | | | | * Add Microblaze target to valid arch list definition Signed-off-by: Adrian Alonso <aalonso@secretlab.ca>
* insane: add micrblaze target infoAdrian Alonso2011-05-101-1/+3
| | | | | | | | | * package_qa_get_machine_dict * Add microblaze dic entry for QA * Prebuilt toolchain triplet microblaze-unknown-linux-gnu- * TARGET_OS is linux-gnu for this toolchain Signed-off-by: Adrian Alonso <aalonso@secretlab.ca>
* gettext.bbclass, bitbake.conf: Append nls options to EXTRA_OECONF instead of +=Khem Raj2011-05-081-3/+3
| | | | | | | | | | | | | | | | | | | Some recipes do not defined EXTRA_OECONF in such cases += drops the --enable|--disable-nls options. In another case where recipe defines EXTRA_OECONF instead of adding/appending to it then --enable|--disable-nls options are lost from EXTRA_OECONF We define EXTRA_OECONF = "" in bitbake.conf so the variable exists always. We use _append instead of += so the option is added at very end and not lost. We only return empty gettext dependencies if its a target recipe in case when USE_NLS is not set because the native/cross/nativesdk recipes still need the gettext dependencies Signed-off-by: Khem Raj <raj.khem@gmail.com>
* package.bbclass: convert unpackaged file message from 'info' to 'warn' so ↵Koen Kooi2011-05-081-2/+2
| | | | | | that it shows up on the console Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
* sanity.bbclass: Add cpio to list of required utilities tested forRichard Purdie2011-05-071-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* boot-directdisk: fix bzImage source locationTom Zanussi2011-05-051-1/+1
| | | | | | | | | Fixes yocto [BUGID #876] boot-directdisk.class looks in the wrong location for the bzImage to install. Make it look in the right place. Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
* linux-yocto: safely process unbranched repositoriesBruce Ashfield2011-05-051-2/+5
| | | | | | | | | | | The BSP bootstrap and -dev use cases can be applied against unbranched or repos without meta data. To allow the proper and safe processing of those repositories, slight modifications to the tools are required to pass the branch on the command line (rather than detecting it always) and to only checkout branches that exist. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
* linux-yocto: apply meta data to external reposBruce Ashfield2011-05-051-6/+21
| | | | | | | | | | | To support quick uprev and testing, it is desireable to build repositories that do not have embedded meta data. In this scenario the meta data can be automatically created or provided externally. This commit supports the first situation by detecting the lack of meta data and then automatically creating a base set of meta files. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
* qemuimagetest: Enable toolchain automation tests in qemuimagetestJiajun Xu2011-05-041-2/+7
| | | | | | | | | | | Enable toolchain automation tests in qemuimagetest framework. 3 C/C++ test projects are added to test toolchain - cvs, iptables and sudoku-savant. User needs to set TEST_SCEN to "toolchain" in local.conf to enable tests. Test case will check if toolchain tarball exists under "${DEPLOY_DIR}/sdk". And it will extract toolchain tarball into /opt. It requires user to chown /opt to non-root user, who will run qemuimagetest. Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
* insane.bbclass: Checking for NLS too when checking gettext dependencyKhem Raj2011-05-041-3/+4
| | | | | | | | | | | Checking for gettext is not needed when --disable-nls is used Let user know what variant of gettext is missing e.g. gettext-native, gettext-nativesdk etc, reveals a bit more for user Check for virtual/gettext Signed-off-by: Khem Raj <raj.khem@gmail.com>
* logging: delete the oe(note|warn|fatal|debug) functionsDarren Hart2011-05-041-26/+1
| | | | | | | | 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>
* logging: update existing oe* logging users to the bb* interfaceDarren Hart2011-05-0410-38/+38
| | | | | | | | | | | 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>
* gettext.bbclass: Updates to better handle gettext alternativesRichard Purdie2011-05-042-15/+15
| | | | | | | | | | * Change gettext dependency to virtual/gettext * Ensure INHIBIT_DEFAULT_DEPS removes gettext dependencies * Use BASEDEPENDS to ensure dependencies are added in native/nativesdk cases Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: Create a BASEDEPENDS variable other classes can use to add to ↵Richard Purdie2011-05-041-3/+5
| | | | | | the base dependencies, avoiding native/nativesdk issues Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* autotools.bbclass: Copy gettext files only if --disable-nls is not setKhem Raj2011-04-281-9/+10
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* insane.bbclass: Move code to add function to tasks toward the endKhem Raj2011-04-281-7/+8
| | | | | | Cosmetic change to make syntax highlighters happy Signed-off-by: Khem Raj <raj.khem@gmail.com>
* logging: add bb* logging mechanisms for bash recipe functionsDarren Hart2011-04-282-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* logging: fix oedebug loglevel testDarren Hart2011-04-281-4/+4
| | | | | | | | | 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>
* sstate.bbclass: Reduce SSTATE_MANIFESTS assignment to be weakKhem Raj2011-04-281-1/+1
| | | | | | | | Distributions can then override this variable if needed useful e.g. when building uclibc/eglibc both using same tmpdir Signed-off-by: Khem Raj <raj.khem@gmail.com>
* cpan.bbclass: export PERLHOSTLIB for perl modulesNitin A Kamble2011-04-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure that native perl .so can get loaded at the buildtime, and avoids following kind of errors while building perl modules: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/20 + perl Makefile.PL EXPATLIBPATH=/disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib EXPATINCPATH=/disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/include *** Module name IN: /disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/Cwd.pm *** Module name OUT: /disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/Cwd.pm *** Module name IN: /disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/Fcntl.pm *** Module name OUT: /disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/Fcntl.pm Can't load '/disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/auto/Fcntl/Fcntl.so' for module Fcntl: /disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/auto/Fcntl/Fcntl.so: wrong ELF class: ELFCLASS32 at /disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/XSLoader.pm line 79. at /disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/Fcntl.pm line 215 BEGIN failed--compilation aborted at /disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/Fcntl.pm line 216. Compilation failed in require at /disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/File/Temp.pm line 146. BEGIN failed--compilation aborted at /disk0/pokybuild/build0/tmp/sysroots/qemux86/usr/lib/perl/5.12.2/File/Temp.pm line 146. Compilation failed in require at inc/Devel/CheckLib.pm line 12. BEGIN failed--compilation aborted at inc/Devel/CheckLib.pm line 12. Compilation failed in require at Makefile.PL line 5. BEGIN failed--compilation aborted at Makefile.PL line 5. ERROR: Function 'do_configure' failed (see /disk0/pokybuild/build0/tmp/work/i586-poky-linux/libxml-parser-perl-2.40-r0/temp/log.do_configure.16956 for further information) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>