aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
AgeCommit message (Collapse)Author
2013-06-10gnomebase.bbclass: add support for archive name different from BPNMarko Lindqvist
Use new variable GNOMEBN, defaulting to value of BPN, instead of BPN directly when determining URL for source archive. Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-10gnomebase.bbclass: implement gnome_verdir() using trim_version()Marko Lindqvist
Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-07base/useradd/sstate: Ensure do_package setscene has correct fakeroot ↵Richard Purdie
dependencies The do_package_setscene task needs to depend on fakeroot in order to correctly install its files. We can whitelist the dependency in the sstate handling code for some performance improvements since we only need this if we're installing the package from sstate. Also use an append operator in base.bbclass for clarity. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07package_*.bbclass: Drop fakeroot from setscene callsRichard Purdie
Back in 2010, I added these in commit: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=36f1ae42fe13dae174b7fb5eb85dc49d7d7b516b however the package_write tasks sstate only consists of package files and no fakeroot privileges are needed to write these out, only originally create them. We can therefore drop these for some small performance gains and a less convoluted depenency chain. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-07kernel.bbclass: Fix link for modules-${MACHINE}.tgzYi Zhao
The modules-${MACHINE}.tgz should link to ${MODULE_TARBALL_BASE_NAME}. But now it links to an invalid file ${MODULE_TARBALL_BASE_NAME}.bin. Remove the extra .bin suffix. [YOCTO #4595] Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-07image_types.bbclass: add ubifs to IMAGE_TYPESAndrea Adami
* the IMAGE_TYPES variable is used exclusively by hob * IMAGE_CMD_ubifs is already present in the class * ubifs images can be flashed on existing ubi volumes with 'ubiupdatevol' Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-07multilib.bbclass: fix the PACKAGEFUNCS_appendRobert Yang
The PACKAGEFUNCS_append = "do_package_qa_multilib" lacks a "space", which would cause unexpected errors. [YOCTO #3190] [YOCTO #4396] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-07insane/package: refactor packaging sanity testsRobert Yang
Refactor packaging sanity tests from package.bbclass to insane.bbclass so that the message can respect WARN_QA (print the warning message and go on the task) and ERROR_QA (print the error message and fail the task). - For the bb.warn(), give it a message name and add it to WARN_QA, then use package_qa_handle_error() to handle it. - For the bb.error(), give it a message name and add it to ERROR_QA, then use package_qa_handle_error() to handle it. - All the bb.warn() and bb.error() have been replaced in package.bbclass. - A few bb.warn() and bb.error() in insane.bbclass have been kept since they can not be replaced or doesn't have to, for example the bb.error() in package_qa_check_license(), it will print the error message and then invoke bb.fatal() to fail the task, I think that we don't have to replace it with package_qa_handle_error(). - Put all the WARN_QA and ERROR_QA in one line, so that they can be redefined by the user easily. [YOCTO #3190] [YOCTO #4396] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-07insane/package: let package.bbclass inherit insane.bbclassRobert Yang
RP's comment: "What we're trying to do is move everything to use a standard mechanism for reporting issues of this type (do_package). With insane.bbclass, you can elect whether a given type of error is a warning or error and fails the task." * The package.bbclass had used package_qa_handle_error() which is from insane.bbclass, and we will use it for handling other warnings and errors, so let package.bbclass inherit insane.bbclass, this change will make the insane as a requirement (always included). * Change the "PACKAGEFUNCS ?=" to "+=", otherwise there would be an error like: Exception: variable SUMMARY references itself! This is because we let package.bbclass inherit insane.bbclass, and PACKAGEFUNCS has been set in insane.bbclass, so the "PACKAGEFUNCS ?=" will set nothing, then the "emit_pkgdata" doesn't run which will cause this error. * Add a QA_SANE variable in insane.bbclass, once the error type is ERROR_QA, it will fail the task and stop the build. [YOCTO #3190] [YOCTO #4396] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-04autotools.bbclass: Factor out aclocal copying functionRichard Purdie
Some recipes may need to manually call the aclocal copying functionality so factor this out into a function. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-04sanity.bbclass: make sure python is a full installJesse Zhang
Components of the Standard Library should be available. Add a sanity check for xml.parsers.expat; we might add more in the future. [YOCTO #4424] Signed-off-by: Jesse Zhang <sen.zhang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-04sstate.bbclass: fixup extra hardcoded pathsJackie Huang
sstate has a logic to fixup hardcoded paths in scripts, but it misses in some specific cases, so add EXTRA_STAGING_FIXMES to the fixup hardcoded paths mechanism, so that we can specify what hardcoded paths need to be fixed in a recipe, e.g. EXTRA_STAGING_FIXMES = "STAGING_BINDIR_TOOLCHAIN" Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-04classes/buildhistory: record removals in buildhistory directoryJonathan Liu
"git add ." does not record files that were removed in the buildhistory directory. Specify the -A flag to also record removals. This was discovered by the following warning added in Git 1.8.3: warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal', whose behaviour will change in Git 2.0 with respect to paths you removed. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30utils.bbclass: ensure $0 is correct in wrapper scriptsRoss Burton
Some packages (eg mesa) will invoke a tool with --version and do string matches on the output (i.e. mesa does $LEX --version |grep "^flex "). This doesn't work with the combination of wrapper scripts and binaries that use $0 as they output "flex.real". Luckily bash's exec lets you set $0. As we want to use this we can't use env, but using export appears to work just as well. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-30pixbufcache: add more documentationRoss Burton
Add some more documentation to the PIXBUFCACHE_SYSROOT_DEPS variable to clarify the usage. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-29cmake.bbclass: modify construction of compiler flagsJoe Slater
Use CFLAGS instead of CPPFLAGS for C_FLAGS variants. When debug optimization is enabled in the local.conf, the debug (-O0) vs production (-O2) does not change in the builds. As the CPPFLAGS do not contain the optimization settings. Also the CXX_FLAGS are based on CXXFLAGS, so it makes sense to similarly set the C_FLAGS based on CFLAGS. Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Jeff Polk <jeff.polk@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-29qmake_base.bbclass: Add linux-gnun32-oe-g++ to QMAKESPECXin Ouyang
For some mips targets, TARGET_OS is set to linux-gnun32, while linux-gnun32-oe-g++ is not listed in the default QMAKESPEC list of qmake in oe-core/wrlinux. This would cause build failures for qt apps, so add a matching rule to fix this. Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-29siteinfo.bbclass: Add mips64 common siteinfoMark Hatle
There is no mips64-common file, replace the definition with mips-common. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-24rm_work.bbclass: ignore failure for removing pseudo folderMing Liu
When building over NFS2/3 server, removal of pseudo folders will fail in some cases for there are files in it still used by pseudo daemon, thus cause ".nfsXXXXX" files generated which can't be removed by clients. This will lead rm_work task fo fail. These failures could be safely ignored because ".nfsXXXXX" files would be automatically cleared by NFS server when no clients keep opening them. [YOCTO #4531] [ CQID: WIND00412051 ] Signed-off-by: Ming Liu <ming.liu@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-24cross: Clear do_populate_sysroot[stamp-extra-info] so that stamps are not ↵Phil Blundell
MACHINE specific Otherwise we will try to run the setscene task once per MACHINE which will lead to file conflicts in the sysroot for packages like gcc-cross. The stamps are already namespaced by TARGET_ARCH which should be sufficient. Signed-off-by: Phil Blundell <philb-mXXj517/zsQ@public.gmane.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-24kernel: Remove unnecessary cd and rm, fix MODULE_TARBALL_SYMLINK_NAME creationMartin Jansa
* DEPLOYDIR is used as target for every other file deployed by do_deploy, this was just unnecessary switching CWD to create relative symlink and I have no idea why rm -f was used together with ln -sf. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-24clutter.bbclass: removed unused functionTomas Frydrych
Clutter and cogl no longer use --with-fpu configure option, so we no longer require the get_fpu_settings() function. Signed-off-by: Tomas Frydrych <tomas@sleepfive.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-24kernel.bbclass: Add dependency on binutilsMike Crowe
Compiling the Linux kernel requires binutils; kernel.bbclass uses INHIBIT_DEFAULT_DEPS so it had better depend on binutils explicitly. (The lack of this dependency isn't always a problem because binutils is required to build gcc-cross but if gcc-cross is reconstructed from the sstate cache then gcc-cross's dependency on binutils-cross is ignored due to being in the safe dependency list in setscene_depvalid.) Signed-off-by: Mike Crowe <mac@mcrowe.com> Acked-by: Phil Blundell <philb@gnu.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-24pixbufcache: update the loader cache when installing nativelyRoss Burton
Register a sstate postinst function so that when installing a native package, the gdk-pixbuf loader cache is updated. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-24sanity.bbclass: Drop dubious printRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-23buildhistory: Sync with bitbake changesRichard Purdie
Adjust to the recent changes in the git fetcher. This code should work with current and previous versions of bitbake and can be cleaned up when we move to new bitbake versions. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-23image.bbclass: add postinst_enable_loggingChen Qi
Add a function postinst_enable_logging, so that when 'debug-tweaks' is in IMAGE_FEATURES, we create ${sysconfdir}/default/postinst config file, which is sourced by run-postinst scripts to determine whether to log or not, and where to log. [YOCTO #4262] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-21task.bbclass: Drop deprecated classRichard Purdie
Any users have had time to adapt to this change by now, drop the old class. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-21update-alternatives: Drop deprecated code, update to show error messageRichard Purdie
This code has been deprecated for a while and confuses the class, lets drop it and just give the user hard error messages instead of the current warnings/fixups. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-21clutter.bbclass: helper class for clutter and friendsTomas Frydrych
Signed-off-by: Tomas Frydrych <tomas@sleepfive.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-21image_types.bbclass: remove the old imagesRobert Yang
Remove the old image before the new one generated to save disk space when RM_OLD_IMAGE is set to 1, this is an easy way to keep the DEPLOY_DIR_IMAGE clean. [YOCTO #4391] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-16toolchain-scripts.bbclass:Add CROSS_COMPILE variable to environment-setup fileZongchun Yu
when compiling the linux kernel manually. users need to set CROSS_COMPILE separately. adding the CROSS_COMPILE variable will be nice for using. Signed-off-by: Zongchun Yu <b40527@freescale.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-16bbclass: bb.fatal() clean upRobert Yang
The bb.fatal() is defined as: def fatal(*args): logger.critical(''.join(args)) sys.exit(1) So anything after bb.fatal() in the same code block doesn't have any effect, e.g.: bb.fatal("%s_%s: %s" % (var, pkg, e)) raise e The "raise e" should be removed. I searched all the files which use bb.fatal(), only the following 3 classes have this issues: insane.bbclass package.bbclass package_rpm.bbclass [YOCTO #4461] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-16boot-directdisk: Scope HDDDIR and HDDIMG variables to avoid conflictsJonathan Liu
These variables should not be shared with other image classes. The bootimg class also has an HDDDIR variable that could be overwritten if executing concurrently in the same image recipe. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-16syslinux: Update to 4.06Jonathan Liu
Patches are now part of upstream or no longer needed. Added new util-linux dependency for isohybrid. Paths updated to reflect directory structure changes. Add CFLAGS and LDFLAGS overrides. [YOCTO #4438] Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-14image.bbclass: Add package-management image feature to validitemsKhem Raj
Some images dont use core-image bbclass and add this feature directly Fixes parsing errors like /builds1/angstrom/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 34734, PID: 24551 Parsing recipes...ERROR: Unable to parse /builds1/angstrom/sources/meta-kde/recipes-images/angstrom-kde-desktop-imag e.bb: Exited with "1" ERROR: 'package-management' in IMAGE_FEATURES is not a valid image feature. Valid features: dbg-pkgs debug-tweaks dev-pkgs doc-pkgs ptest-pkgs read-only-rootfs splash staticdev-pkgs ERROR: 'package-management' in IMAGE_FEATURES is not a valid image feature. Valid features: dbg-pkgs debug-tweaks dev-pkgs doc-pkgs ptest-pkgs read-only-rootfs splash staticdev-pkgs ERROR: Command execution failed: Exited with 1 Signed-off-by: Khem Raj <raj.khem@gmail.com>
2013-05-14package.bbclass: Fix sources contentsRichard Purdie
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=c376f1f49cea182a2887945840ab97a20970a373 fixed a valid issue where the sources file was accumulating information and subsequent task runs of do_packacge were not cleaning it. The fix is wrong however since we're removing the file within a loop. This fix removes the file outside the loop ensuring it is not truncated and contains the correct information. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-13sanity.bbclass: Attach the missing value to a format string.Peter Seebach
The tuning changes to sanity.bbclass were almost right, but one of the messages had a %s with no % operator. Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
2013-05-12image-vmdk.bbclass: disable the NOISO = "1"Robert Yang
The vmdk needed hddimg which was generated by do_bootimg in the past, but do_bootimg generated both iso and hddimg, so we set NOISO = "1", it now uses do_bootdirectdisk, doesn't use do_bootimg anymore, so we don't need NOISO = "1", and need remove it, otherwise: IMAGE_FSTYPES += "live vmdk" Would not generate the iso. I'd like to remove it rather than comment it, but we had comment the do_bootimg before. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-12classes/core-image: drop apps-console-core IMAGE_FEATURES supportPaul Eggleton
Remove the legacy support for the apps-console-core IMAGE_FEATURES item; we've kept this for a while but it's time for it to go. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-12classes/image: show an error on invalid IMAGE_FEATURESPaul Eggleton
If the user specifies an invalid feature in IMAGE_FEATURES, show an error during parsing. Valid IMAGE_FEATURES are drawn from PACKAGE_GROUP_ definitions, COMPLEMENTARY_GLOBS and a new 'validitems' varflag on IMAGE_FEATURES (so that additional non-package group features can be added elsewhere.) Implements [YOCTO #3308]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-12image-vmdk: Fix error recreating symbolic linkJonathan Liu
If the vmdk image symbolic link already exists from a previous build, overwrite it instead of returning an error. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-05-12imagetest-qemu.bbclass, qemuimage-testlib: add support for more FSTYPESStefan Stanacar
qemuimage-testlib hardcodes ext3 as fs type. This adds support for more images types which are supported by runqemu: ext[234]/jffs2/btrfs. I've skipped (for now) vmdk (which qemu can boot) because: - we don't have network on images without connman because of the way runqemu starts vmdk images (can't pass kernel args for network config) - qemuimage-testlib-pythonhelper relies on '192.168' being in the output of ps to return the pid Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10classes/insane: add check for PN in OVERRIDESPaul Eggleton
If a recipe is named such that its PN value matches something already in OVERRIDES (such as when PN happens to be the same as MACHINE or DISTRO), it can have unexpected consequences. Assignments such as FILES_${PN} = "xyz" effectively turn into FILES = "xyz". Implements [YOCTO #4288]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10classes/buildhistory: track contents of selected files in imagesPaul Eggleton
Add a BUILDHISTORY_IMAGE_FILES variable specifying a space-separated list of files within an image to copy into buildhistory, so that changes to them can be tracked. Typically this would be used for configuration files, and by default this includes /etc/passwd and /etc/group, but the user is free to extend this list by setting the variable in local.conf. Implements [YOCTO #4154]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10boot-directdisk/bootimg/image-vmdk: remove more nostamps for image generationRobert Yang
We have removed the nostamps for do_rootfs and do_build, so it seems reasonable to remove the stamps for do_bootimg, do_bootdirectdisk and do_vmdkimg. The current problem is that the do_vmdkimg always re-run, but the do_rootfs may not, so the code like below in the do_rootfs function doesn't re-run and cause problems (the symlink exists when the do_vmdkimg creates the symlink again): if d.getVar('IMAGE_LINK_NAME', True): cmds += "\trm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*" Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10kernel.bbclass: make FILES package-specificTom Zanussi
Fix QA warnings seen when using 'traditional' kernel recipes e.g.: WARNING: QA Issue: .../recipes-kernel/linux/linux_3.0.18.bb: Variable FILES is set as not being package specific, please fix this. Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09imagetest-qemu: Fix indentationRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09class/lib: Fix up various file access methodsRichard Purdie
There are various bits of cruft that have built up around our file accesses. This patch cleans some of them up, specifically: * Remove pointless "from __builtin__ import file" * Use open(), not file() * Wrap file usage in a with container to ensure files are closed * Add missing .close() calls in some cases Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-09buildstats: Drop spurious open() callRichard Purdie
This file is already opened a few lines previously, so drop the duplicated call. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>