summaryrefslogtreecommitdiff
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* multilib.bbclass: Added multilib specific package QA.Lianhao Lu2012-05-181-0/+31
| | | | | | | | Added a new PACKAGEFUNCS function to check the multilib packages' dependency. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* (libc-)package.bbclass: Added MLPREFIX to locale packages.Lianhao Lu2012-05-182-4/+5
| | | | | | | Added multilib prefix to the locale related package names/dependencies. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: check user can read and write to SSTATE_DIRJoshua Lock2012-05-171-3/+14
| | | | | | | | The user needs read and write permissions to SSTATE_DIR, check whether they have sufficient permissions and if not recommend use of SSTATE_MIRRORS. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* archiver.bbclass: Add two default set for avoiding error when missing assignmentXiaofeng Yan2012-05-171-1/+3
| | | | | | | | Add two default set(SOURCE_ARCHIVE_LOG_WITH_SCRIPTS, \ SOURCE_ARCHIVE_PACKAGE_TYPE) to archiver.bbclass for avoiding \ building error when forgetting to assign to them. Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
* meta/classes/sstate.bbclass: ensure sstate files have group R/WJoshua Lock2012-05-171-0/+1
| | | | | | In order to make sharing sstate files easier chmod them with 0664 permissions so that they are readable and writable by the user and any other members of their group. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* kernel.bbclass: add deploy link to KERNEL_IMAGETYPEChristopher Larson2012-05-171-0/+1
| | | | | | | It's common to provide a non-machine-suffixed link in DEPLOY_DIR_IMAGE, so let's be consistent and do so here as well. Signed-off-by: Christopher Larson <chris_larson@mentor.com>
* classes/mirrors.bbclass: Point snapshot.debian.org mirror to working locationKhem Raj2012-05-161-1/+1
| | | | | | | | | If you point to snapshot.debian.net/archive/pool then it will fetch you a html page which will end up in corrupt download. The locations have changed for archives and here we point the mirror to right location. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* sstate.bbclass: Optimize the generation and install path fixupsMark Hatle2012-05-151-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fixmepath file that is generated contains a list of all of the files that need their paths fixed. In the previous version the fixmepath was generated to include all of the files that sed may have changed. In the new version, we first grep the files to see if they contain a path that needs to be changed, only then do we perform the sed operation on those files. This results in a modest performance increate in the creation of the sstate file. The following numbers include the do_package and do_populate_sysroot tasks on the perl recipe. Before the change: real 4m23.018s user 1m57.067s sys 1m33.327s After the change: real 4m13.083s user 1m54.062s sys 1m26.064s However, a more significnt performance gain is felt during the extraction/install of sstate cache files, as the fixmepaths file now has a significantly smaller list of files to modify. Before the change: real 0m39.798s user 0m11.158s sys 0m12.642s After the change: real 0m25.511s user 0m8.408s sys 0m5.077s (All numbers above were recorded with a cold filesystem cache on a machine with 12 GB of ram.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/rootfs_*: fix splitting package dependency stringsPaul Eggleton2012-05-132-4/+4
| | | | | | | | | | | | | | If a + character appears in a version specification within the list of package dependencies, the version will not be removed from the list in list_package_depends/recommends leading to garbage appearing in the dependency graphs generated by buildhistory. To avoid any future problems due to unusual characters appearing in versions, change the regex to match almost any character. Fixes [YOCTO #2451]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Drop dubious use of packages[0] from do_split_packages and ↵Richard Purdie2012-05-121-19/+4
| | | | | | | | | | | do_split_locales As the comment says, using packages[0] is rather broken and can be incorrect, as demonstrated by the recent gdk-pixbuf change. Replacing it with PN is a bit more correct and more likely to do what was originally intended by this function. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-yocto: export GUILT_BASE to devshellBruce Ashfield2012-05-111-1/+2
| | | | | | | | | | | | | One of the patch backends to linux-yocto is guilt, which normally tracks patches under .git. But .git isn't something that can be checked into a SCM and repeated. So it has been moved under meta/patches and committed to the meta branch. If devshell is used, GUILT_BASE isn't set, so patch manipulations will fail. We export GUILT_BASE and point it at the meta directory when devshell is invoked for linux-yocto. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
* package.bbclass: Drop EXPORT_FUNCTIONS use against mapping_rename_hookRichard Purdie2012-05-114-6/+4
| | | | | | | | | | | | The usage of this function renaming and it being called using bb.build.exec_func() causes needless indirection loops, confusing log files and seems generally pointless. This simplification makes the process much simpler and faster. I can't come up with a good reason why the export_functions functionality is needed for this function. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Improve sstate_installpkg performanceMark Hatle2012-05-111-7/+21
| | | | | | | | | | | | | | | | | | | | | | | In a pathological case, lots of files to process, the sstate_installpkg performance was very poor. It interated over each file and ran 3 individual sed commands per file. Changing this to keep iterating but running only a single command took about 1/3 time time. However, when looking at the corresponding sstate_hardcode_path function, it was clear we could optimize this further. Using the same encoding logic to specify only the minimumal sed operation necessary, and using xargs to avoid the os.system call the install step was able to be performed in 13% of the original time. Example timing numbers for perl: 3m7s original code 1m20s single sed, but interating 0m26s using xargs and limited sed Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* typecheck.bbclass: update per current variable typing codeChristopher Larson2012-05-111-1/+1
| | | | Signed-off-by: Christopher Larson <chris_larson@mentor.com>
* sanity.bbclass: Detect empty $PATH components tooPeter Seebach2012-05-111-2/+3
| | | | | | | | Empty components in $PATH have the same effect as a . in $PATH, and are a common side-effect of inserting a misspelled or unset shell variable in $PATH. Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
* blacklist.bbclass: Refactor, use PNBLACKLIST[pn]Mark Hatle2012-05-111-11/+11
| | | | | | | | | | | | | | | | | Revise the handling from ANGSTROM_BLACKLIST to PNBLACKLIST[pn]. Refactor the code to eliminate references to the distribution and recipe name in the message. Change the skipPackage message message from: ERROR: <recipe> was skipped: <distro> DOES NOT support <recipe> because <reason> to: ERROR: <recipe> was skipped: Recipe is blacklisted: <reason> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
* blacklist: fix typo in nameMark Hatle2012-05-111-0/+20
| | | | | | | | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Import directly from meta-openembedded commit: a63c374cdc785ade69d2998978d08280e671dc1f Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
* libc-package.bbclass: Add MLPREFIX while dynamically set RDEPENDSDongxiao Xu2012-05-091-5/+7
| | | | | | We need to add MLPREFIX when set RDEPENDS by setVar() function. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
* image_types.bbclass: redefine EXTRA_IMAGECMD_jffs2 to leverage siteinfoTing Liu2012-05-091-1/+6
| | | | Signed-off-by: Ting Liu <b28495@freescale.com>
* sanity.bbclass: Implement initial toolchain sanity checksPeter Seebach2012-05-091-0/+73
| | | | | | | | | | | | | | | | | This introduces a sanity check for the toolchain, which verifies each tuning (including any multilibs), producing meaningful diagnostics for problems, and also provides some higher-level tuning features. The TUNEVALID and TUNECONFLICT/TUNECONFLICTS settings were not implemented. Listed one or two missing features in TUNEVALID, also (in a previous patch) fixed the references to features which didn't exist. This patch also provides a whitelisting mechanism (which is completely unused) to allow vendors providing prebuilt toolchain components to restrict tunings to those based on or compatible with a particular ABI. Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
* linux-yocto: streamline support for multiple upstream repo typesBruce Ashfield2012-05-081-55/+60
| | | | | | | | | | | | | | | | | In order to support repositories of various types (with or without meta data, branched, pristine, custom, etc) information about the type of processing that is required was passed to the processing phases via variables. The combination of variables involved in coordinating the processing creates a learning curve and overly complicates recipe extensions. With minor tweaks to the kern-tools, adding flexibility and keying off the existence of the meta branch it is possible to remove all of the variables that were added to support different repository types. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
* image.bbclass,kernel.bbclass: Use kmod-native instead of module-init-tools-crossKhem Raj2012-05-062-5/+4
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* terminal.bbclass, oe-buildenv-internal: pass SCREENDIR environment variableJason Wessel2012-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some versions of the screen utility provided from the host OS vendor write the socket directory to $HOME/.screen. When using a shared home directory across many servers, one sets the SCREENDIR environment variable to avoid collisions in the shared home directory. This results in problems launching a devshell where it is not entirely obvious what happened because the SCREENDIR environment variable got stripped from the environment prior to setting up the screen in detached mode. Example: % bitbake -c devshell busybox # ...Please connect in another terminal with "screen -r devshell" % screen -r devshell There is no screen to be resumed matching devshell. The temporary work around was to do something like: sh -c "unset SCREENDIR; screen -r devshell" This patch adds SCREENDIR to the white list to ensure screen works properly on systems where a developer needs to use the SCREENDIR with shared home directories. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: fix multiple commit of images and packages at the same timePaul Eggleton2012-05-041-1/+1
| | | | | | | | | | | | | The echo line here was merging multiple lines into one, and the result was that if both image and package changes had to be comitted then only the image changes were being committed and the package changes could potentially be merged into the next package change. Quoting the variable reference fixes this. Fixes [YOCTO #2411] Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: move kernel-vmlinux up in PACKAGESChristopher Larson2012-05-031-1/+1
| | | | | | | | | If KERNEL_IMAGETYPE is vmlinux, the expectation is most likely that there will be no kernel image package, but we still want a vmlinux package for debugging, so move kernel-vmlinux in front of kernel-image in PACKAGES. Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* libc-package: rework ''precompiled' locale handlingChristopher Larson2012-05-031-51/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a couple problems with the handling of precompiled locales. - it gathered the list of locales from the directories - this breaks due to the naming mismatch, e.g. en_US.UTF-8 vs en_US.utf8. - it retained its hardcoded assumption that the non-suffixed locale (en_US, as opposed to en_US.*) is UTF-8, while the others are otherwise. Hardcoding this is both inflexible and just plain wrong for some toolchains. It's most common in desktop distros for 'en_US' to be non-utf8, and ''en_US.UTF-8' is utf8, and this is the case in some external toolchains as well. The code now uses the SUPPORTED file to hold the knowledge it needs. This file not only holds the list of locales to generate, but also maps the locale names to the charsets they correspond to. The code now uses this to assemble its charset map, falling back to the '.' suffix as charset when the locale is not in the map. For precompiled, it now uses the locale->charset knowledge it has, thereby allowing non-utf8 non-suffixed locale names, whereas for non-precompiled, it reverts to the previous assumption, renaming the utf8 locale and forcibly suffixing the others. So, a person maintaining an external toolchain recipe is responsible for ensuring that the SUPPORTED file they provide matches up with the compiled locales in the toolchain, if they want to utilize precompiled locales. I believe in the long term the compiled case should do the same thing precompiled does, and use SUPPORTED or a similar mechanism to encode the knowledge, and if people want all the non-suffixed names to be utf8, they can change that file to do so. This would avoid the hardcoded assumption in the code, as well as consolidating the behavior between the compiled and precompiled cases. Signed-off-by: Christopher Larson <kergoth@gmail.com>
* 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>
* package_rpm: Only rebuild the indexes if the packages have changedRichard Purdie2012-04-271-14/+4
| | | | | | | | | | | | This change farms the solvedb creation out to a separate script which handles creation of the index, only if mtime of any of the packages has changed. For a core-image-minimal set of rpm's this saves ~20s of a 45s rootfs build. For core-image-sato it saves 1 minute of a 5 minute rootfs build. The more packages in the system, the bigger the saving will be. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: Replace shell provides/requires script with python versionRichard Purdie2012-04-261-9/+13
| | | | | | | | | | | | The existing shell script is a fork bomb and forks off hundreds of grep/cur/wc calls as it reads from its input stream and iterates over the file data table for each line of input. This patch replaces the shell code with python code which doesn't exec anything and hence runs much faster without the exec() overhead. This speeds up rpm packaging considerably, as can be measured simply by timing it, or watching the processor utilisation. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Add recipe class to overridesRichard Purdie2012-04-266-1/+6
| | | | | | | | | | | | | | | | | | | | | 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>
* {kernel, module}.bbclass: don't run depmod for module packages during do_rootfsAndreas Oberritter2012-04-242-7/+4
| | | | | | | | | | | | | | | * depmod already gets executed by pkg_postinst_kernel-image. * If you build a module using module.bbclass, pkg_postinst returns 1 in do_rootfs, causing pkg_postinst to run again on first boot. To improve this situation, I copied pkg_postinst from kernel.bbclass to module.bbclass. This was rejected by Koen, because he doesn't like the code from kernel.bblcass, which uses ${STAGING_DIR_KERNEL}. Richard then suggested that calling depmod during do_rootfs wasn't necessary at all, because it already gets done by kernel-image. Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: unify white spacesMartin Jansa2012-04-241-13/+13
| | | | | | | | | | * indentation was with spaces and tabs, unify to use tabs instead of spaces, for shell code and populate_packages_preppend, because "python populate_packages" expects tabs (or 8 spaces) * and use 4 spaces for anonymous python Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: merge uboot_mkimage improvements from meta-oeMartin Jansa2012-04-241-16/+25
| | | | | | | | * allows to detect ENTRYPOINT from kernel binary marked with UBOOT_ENTRYSYMBOL used e.g. by ben-nanonote Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* utils.bbclass: Testing via env in create_wrapper is a nice idea but breaks ↵Richard Purdie2012-04-241-3/+1
| | | | | | | | | | | | things For example, pseudo-native wants to set LD_LIBRBARY_PATH but setting this into the environment here causes the existing pseudo (running during do_install) to poke into paths in /opt and this breaks builds. The simplest fix is simply not to do this. Comments tweaks to match the code. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bootimg.bbclass: Tweak iso images to become hybrid imagesDamien Lespiau2012-04-241-0/+2
| | | | | | | | | | | This allows iso images to be written to usb keys and booted on systems which have a BIOS which support this. There is no real down side to tweaking the iso images in this way. [YOCTO #1763 partial] Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: Fix packaging issueSaul Wold2012-04-241-1/+1
| | | | | | | | | | | | Remove /etc since it is empty, when creating a machine that does not deliver any module config files, the /etc is empty and is then warned about not being shipped, so we remove it. This occurs in the routerstationpro with the following warning: WARNING: For recipe linux-yocto, the following files/directories were installed but not shipped in any package: WARNING: /etc Signed-off-by: Saul Wold <sgw@linux.intel.com>
* quilt: move empty quiltrc to native sysconfdirSaul Wold2012-04-241-1/+1
| | | | | | | | | | | | patch.bbclass orignally pointed at /usr/bin/quiltrc for an empty version to ensure that no user setting were picked up, change this to /etc/quiltrc in the Native sysroot since we now have a native sysconfdir. Make sure that the quiltrc is actually installed in the Native sysconfdir, not the target, so fix this after the recipe split. Signed-off-by: Saul Wold <sgw@linux.intel.com>
* sanity.bbclass: Add a new case to issue sanity_check()Dongxiao Xu2012-04-241-0/+3
| | | | | | | | Judge if "SanityCheck" event is received, it will issue the sanity_check() and send "SanityCheckPassed" back if succeeded. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: add variable to disable the sanity checksJoshua Lock2012-04-231-1/+1
| | | | | | | | | | | It's useful for Hob to be able to disable the sanity checks completely without marking them as passed so that the user can get into the GUI to configure their settings, etc. Add a variable, DISABLE_SANITY_CHECKS, to do so. Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Ensure kernel modules get strippedRichard Purdie2012-04-221-0/+8
| | | | | | | | Kernel modules are not marked as executable but we do expect to strip them. This patch adds in missing code to ensure we do this. Without this images are getting sigificantly bloated in size. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gettext.bbclass: Ensure we don't overwrite other DEPENDS_GETTEXT valuesRichard Purdie2012-04-221-1/+1
| | | | | | | | In particular, this overwrites the value from cross-canadian.bbclass in some cases which isn't the desired behaviour and unnecessarily complicates/breaks the dependency chain. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* packageinfo.bbclass: A workaround for RPM architecture renamingDongxiao Xu2012-04-181-1/+12
| | | | | | | | | | | For beagleboard platform, the PACKAGE_ARCH for certain recipes is "armv7a-vfp-neon", however, the architecture label in RPM file name is "armv7a" due to a potential bug in RPM backend. This commit is a workaround to make Hob work in this case. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/sanity: import regular expression module in SuSE distro checkPaul Eggleton2012-04-181-0/+1
| | | | | | | | We call re.sub here, so we need to "import re" or an error occurs (tested on OpenSuSE 12.1). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/sanity: trim trailing newline when reading /etc/redhat-releasePaul Eggleton2012-04-181-1/+1
| | | | | | | | Any trailing whitespace needs to be stripped before comparing it to the SANITY_TESTED_DISTROS list. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* linux-yocto: .diff is a valid patch extensionBruce Ashfield2012-04-171-1/+1
| | | | | | | | | | | | | | | In fixing an existing patch migration bug, the list of valid extensions got out of sync from the core patch class. As a result, valid patches were not being applied to the tree. Updating the tools to migrate .diff files fixes the issue. Also in this fix is the removal of .patch in the find_sccs() routine, since it will never be returned by patch.bbclass when all non-patches are requested, it is simply confusing. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: If the sanity tests fail, don't mark them as completeRichard Purdie2012-04-171-1/+1
| | | | | | | | | If the sanity tests fail, we still were writing out the stamp which means they'd get skipped the next time we run bitbake. This is clearly wrong and we should only write out the stamp file if the sanity tests complete successfully. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distrodata.bbclass: fix comment typoOtavio Salvador2012-04-161-1/+1
| | | | | | | | | | Fixes: - xf86-intput-synaptics-12.6.9.tar.gz + xf86-input-synaptics-12.6.9.tar.gz Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Multilib: Fix RDEPENDS in libc-package.bbclass, useradd.bbclass...Zhai Edwin2012-04-163-3/+4
| | | | | | | MLPREFIX is needed in RDEPENDS for multilib build Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mulitlib.bbclass: Ensure correct value of ALL_MULTILIB_PACKAGE_ARCHS is ↵Richard Purdie2012-04-141-0/+3
| | | | | | | | | | | | | | | preserved The value of ALL_MULTILIB_PACKAGE_ARCHS needs to be consistent both in multilib extended recipes and in normal context. If this isn't the case it can lead to inconsistent configuration files at a minimum. This patch ensures the value is preserved during the class extension code since computing it after that point is hard. [YOCTO #2290] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>