aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2015-02-03lib/oe/terminal: add support for Terminology terminal emulatorRodrigo Chiossi
Terminology is the default Enlightenment terminal emulator Signed-off-by: Rodrigo Chiossi <rodrigo.chiossi@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-03package_manager.py: fix rootfs failure with multilib enabledChen Qi
With the current code, if we use debian package backend and enable multilib support, the do_rootfs process would always fail with error messages like below. E: Unable to locate package packagegroup-core-boot This patch fixes the above problem. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-03terminal.py: fixes launching multiple windows of gnome-terminalAlejandro Hernandez
When resolving a patch, a new process of gnome-terminal is created for every patch to be resolved, it "waits" for the previous one to end, instead of launching multiple windows at the same time. [YOCTO #7254] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-03image.bbclass: make kernel depmod data optionalDan McGregor
This allows an image to skip the creation of kernel depmod data. It is useful for creating an image that will run as a container image inside a host with no knowledge of the parent's kernel. Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-03lib/oe/image.py: add error checking for missing IMAGE_CMDPaul Eggleton
An invalid value in IMAGE_FSTYPES was triggering a traceback. Add a check and a reasonable error message instead. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-02-03classes/image: ensure uninstalled packages do not appear in manifestsPaul Eggleton
Since the rewrite of the image construction code in python a few releases ago, we remove a couple of packages from the image as one of the final steps when constructing the image (notably update-rc.d and run-postinsts). However, because of the order of operations, these packages are still listed both in the buildhistory installed_package*.txt files and in the manifest file created next to the image, which is wrong. There were two possible solutions to this: (1) change the order such that the uninstallation occurs before calling ROOTFS_POSTPROCESS_COMMAND or (2) add another hook variable in such that we can have the package list collection code run at the right time. Because it's currently possible (but very much not recommended) to install additional packages within ROOTFS_POSTPROCESS_COMMAND, which may have postinstall scripts and thus require the packages we would otherwise uninstall if we were to take option 1, option 2 is really the least likely to cause problems. Therefore, add ROOTFS_POSTUNINSTALL_COMMAND and make the image and buildhistory classes use it. Fixes [YOCTO #6479]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-02-03lib/oe/rootfs.py: rename _uninstall_uneeded to fix spelling errorPaul Eggleton
Rename it to _uninstall_unneeded. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-01-29kernel: Fix depmod for multilibRichard Purdie
Using populate_sysroot for this data was a nice idea but flawed as it doesn't work in multilib builds. Instead we can use PKGDATA_DIR since this is consistent over multilib builds. It also turns out to be slightly neater code too. Hopefully this resolves the problem once and for all. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23kernel/image/depmodwrapper: Fixups for depmodRichard Purdie
With the rpm package backend enabled, running: bitbake <image> bitbake virtual/kernel -c clean bitbake <image> -c rootfs -f results in an image with incorrect kernel module dependency information. The problem is that the System.map and kernel-abiversion files are needed for depmod and after the recent kernel changes, these are no longer in sstate. Its reasonable to require the kernel to unpack/build if you're about to build a module against it. It is not reasonable to require this just to build a rootfs. Therefore stash the needed files specifically for depmod. Also fix some STAGING_KERNEL_DIR references which were incorrect, found whilst sorting through his change. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23lib/oe/package: Ensure strip breaks hardlinksRichard Purdie
Normally, strip preserves hardlinks which in the case of the way our hardlink rather than copy functionality works, is a disadvantage and leads to non-deterministic builds. This adds a move into place after the strip operation to ensure hardlinks are broken and we bring back build determinism. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-01-23oeqa/utils/decorators: Try and improve ugly _ErrorHandler tracebacksRichard Purdie
Currently, if one module is skipped, any other module calling skipModule causes tracebacks about _ErrorHandler not having a _testMethodName method. This reworks the code in a way to avoid some of the problems by using the id() method of the objects. It also maps to the correct name format rather than "setupModule" or just skiping the item entirely. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-01-23lib/oe/sdk.py: Add SDKIMAGE_INSTALL_COMPLEMENTARY capabilities to DpkgSdkPau Espin Pedrol
Creating an SDK by means of do_populate_sdk, complementary packages (SDKIMAGE_FEATURES = "dev-pkgs dbg-pkgs") are not installed when using the deb packaging system. The reason is that the call to install the complementary packages is missing from the deb backend. This patch fixes that. [YOCTO #7160] (From OE-Core rev: 0bcca69ea97ac51acf290f8f1da1bde715ab51c4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16lib/oe/rootfs.py: Fix reference to abiversion file locationRichard Purdie
With the changes to kernel layout, we need to refer to the correct location of the kernel abiversion file. Thanks to Saul, Randy, Darren and Bruce to figuring out the issue. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-07oeqa/parselogs: Added a check in case the folder location does not contain ↵Lucian Musat
any log files Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-31oeqa/selftest: fix test_incremental_image_generation for changes in log outputYi Zhao
test_incremental_image_generation case failed because the log output chanaged: FAIL: test_incremental_image_generation (oeqa.selftest.buildoptions.ImageOptionsTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildarea3/yzhao1/poky-build/meta/lib/oeqa/utils/decorators.py", line 90, in wrapped_f return func(*args) File "/buildarea3/yzhao1/poky-build/meta/lib/oeqa/selftest/buildoptions.py", line 25, in test_incremental_image_generation self.assertEqual(0, res.status, msg="No match for openssh-sshd in log.do_rootfs") AssertionError: 0 != 1 : No match for openssh-sshd in log.do_rootfs ---------------------------------------------------------------------- Using re search instead grep Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-31oeqa/parselogs: Add harmless failure warning introduced by new qemu version ↵Richard Purdie
on qemuppc Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25oeqa/selftest: fix test_force_task so it doesn't taint the entire buildPaul Eggleton
Using -C sets a taint on the specified task, and m4-native is in the dependency chain for just about everything, which means that everything gets forced to rebuild. We don't need the influence of this test to extend outside of the test itself, so ensure that the taint gets cleared at the end of the test. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2014-12-25oeqa/selftest: populate pkgdata/shlibs in test_recipetool_create_gitPaul Eggleton
Build some recipes so that we have the needed data in the sysroot for recipetool to refer to when scanning for dependencies. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2014-12-25oeqa/selftest: improve failure messages for devtool testsPaul Eggleton
assertTrue prints "False is not True" if it fails, which is pretty much useless. Use a more appropriate assertion test where practical and add a message where it isn't. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2014-12-25oeqa/selftest: skip test_incremental_image_generation if not using rpmPaul Eggleton
We have just implemented incremental ipk image generation, but at the moment this test doesn't support that, so skip it if not using rpm. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2014-12-25oeqa/selftest: fix test_event_handler for changes in bitbake outputPaul Eggleton
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2014-12-25oeqa/utils: fix testcase decorator to allow calling tests individuallyPaul Eggleton
Without this, running tests individually failed with a traceback: $ oe-selftest --run-test buildoptions.ImageOptionsTests.test_incremental_image_generation 2014-12-23 14:40:37,636 - selftest - INFO - Checking that everything is in order before running the tests 2014-12-23 14:40:38,408 - selftest - INFO - Running bitbake -p 2014-12-23 14:40:40,235 - selftest - INFO - Loading tests from: oeqa.selftest.buildoptions.ImageOptionsTests.test_incremental_image_generation Traceback (most recent call last): File "/home/user/poky/scripts/oe-selftest", line 179, in <module> ret = main() File "/home/user/poky/scripts/oe-selftest", line 164, in main suite.addTests(loader.loadTestsFromName(test)) File "/usr/lib64/python2.7/unittest/loader.py", line 91, in loadTestsFromName module = __import__('.'.join(parts_copy)) File "/home/user/poky/meta/lib/oeqa/selftest/buildoptions.py", line 12, in <module> class ImageOptionsTests(oeSelfTest): File "/home/user/poky/meta/lib/oeqa/selftest/buildoptions.py", line 14, in ImageOptionsTests @testcase(761) NameError: global name 'func' is not defined Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2014-12-25oeqa/utils: replace some tabs with spacesPaul Eggleton
Python code should use spaces only for indentation. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2014-12-24lib/oe/image.py: Handle compressed IMAGE_TYPEDEP valuesOtavio Salvador
When computing the dependency graph for the image generation, we need to take into account the compression type and identify the base type it relates to. This allow for a more robust graph generation even when using composed image types. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-21devtool: add QA testsPaul Eggleton
Add some QA tests for devtool (and recipetool). These aren't comprehensive but at least they are a start, and have already helped me catch and fix a number of regressions. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-21oeqa/utils: make get_bb_var() more reliablePaul Eggleton
* Enable querying exported variables * Use strip() to remove quotes so any internal quotes are not disturbed Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-21lib/oe: add recipeutils modulePaul Eggleton
Add a module to help provide utility functions for dealing with recipes. This would typically be used by external tools. Substantial portions of this module were borrowed from the OE Layer index code; other functions originally contributed by Markus Lehtonen <markus.lehtonen@intel.com>. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-21lib/oe/patch: add support for extracting patches from git treePaul Eggleton
When patches from a recipe have been written out to a git tree, we also want to be able to do the reverse so we can update the patches next to the recipe. This is implemented by adding a comment to each commit message (using git hooks) which we can extract later on. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-21lib/oe/patch.py: abort "git am" if it failsPaul Eggleton
If we don't do this, you may still be in the git am resolution mode at the end of applying patches, which is not desirable. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-21lib/oe/patch: use --keep-cr with git amPaul Eggleton
Preserving carriage returns is important where the patch contains them. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-21lib/oe/patch: auto-commit when falling back from git amPaul Eggleton
When PATCHTOOL = "git", if we're not able to use "git am" to apply a patch and fall back to "git apply" or "patch", it is desirable to actually commit the changes, attempting to preserve (and interpret) the patch header as part of the commit message if present. As a bonus, the code for extracting the commit message is callable externally in case it is useful elsewhere. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-21lib/oe/patch: fall back to patch if git apply failsPaul Eggleton
When PATCHTOOL = "git", git apply doesn't support fuzzy application, so if a patch requires that it's better to be able to apply it rather than just failing. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-21classes/package: move read_shlib_providers() to a common unitPaul Eggleton
This allows us to use this function elsewhere in the code. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-05package_manager.py: fix arguments to string formatRoss Burton
Multiple arguments to string formats need to be in a tuple. Reported by Lorenz <lqb.list@gmail.com>. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-12-03package_manager.py: check the result of create_indexHongxu Jia
While invoking create_index failed, there was no error output and didn't break the build until the package installation. ... |ERROR: run-postinsts not found in the base feeds (qemux86 i586 x86 noarch any all). ... The reason is we used multiprocessing to execute create_index, and did not check its invoking result. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-25oeqa/runtime: Added some new filters for the log parser Including custom ↵Lucian Musat
filters for edgerouter, minnow and jasperforest. Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-12classextend: Do not extend for that already have multilib prefixJackie Huang
If a BSP supports two or more multilibs, for example: MULTILIBS = "multilib:lib32 multilib:lib64" and a variable is already extended to include multilib variants, for example in populate_sdk_base: commit 396371588c7fd2d691ca9c39cd02287e43cb665b Author: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Thu Jul 24 22:09:09 2014 +0100 populate_sdk_base: Extend TOOLCHAIN_TARGET_TASK to include multilib variants Most people expect the toolchain from a multilib build to contain multilib components. This change makes that happen and is easy for users to override should they want something different. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> The mapping clsextend.map_depends_variable("TOOLCHAIN_TARGET_TASK") ends up with a wrong double extended package name like: lib32-lib64-packagegroup-core-standalone-sdk-target This patch avoid such issues. Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-09package_manager: DpkgPM fix populate_sdkAníbal Limón
DpkgPM change all_arch_list variable set from PACKAGE_ARCHS to passed archs variable because is different when is executed from rootfs.py and sdk.py. Credits to: Ricardo Ribalda <ricardo.ribalda@gmail.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-09image-buildinfo.bbclass: new class, writes build information to imageAlejandro Hernandez
Writes build information to target filesystem on /etc/build such as enabled layers, their current status and commit. squashspaces was moved to oe/utils.py to make it available to different classes and avoid code duplication. [YOCTO #6770] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-04rootfs.py: tweak inner warn message catchingHongxu Jia
The fix filters out irrelevant messages, and makes the catching more accurate, the inner warn message in do_rootfs usually comes from the output of complementary install, and pattern the format to catch it. Here is the example of irrelevant messages: ... |WARNING: log_check: There is a warn message in the logfile |WARNING: log_check: Matched keyword: [warn] |WARNING: log_check: `tmp/deploy/rpm/core2_64/pam-plugin-warn -1.1.6-r5.0.core2_64.rpm' -> `tmp/work/intel_x86_64-wrs-linux/ wrlinux-image-installer/1.0-r0/rootfs/Packages.intel/./core2_64/ pam-plugin-warn-1.1.6-r5.0.core2_64.rpm' ... Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-04package_manager: Fix BAD_RECOMMENDATIONS for opkgPaul Barker
In package_manager.py, when using opkg as the packager, the command 'opkg <args> info <pkg>' is called to get information about each pkg in BAD_RECOMMENDATIONS in a format that can be written to the status file. The 'Status: ...' line is modified and all other lines are passed through. Changing the verbosity level argument for this command will change what it written into the status file. Crucially, with the default verbosity level, no blank lines are being printed by the opkg command and so no blank lines are being written to the status file to separate each package entry. The package parsing code in opkg expects package entries in the status file to be separated by at least one blank line. If no blank line is seen, the next package entry is interpreted as a continuation of the last package entry, but the new values overwrite the old values. So with the default verbosity level, a blank line follows some package entries and these are parsed. The others are dropped due to the lack of blank lines. As the verbosity increases, more debugging messages add blank lines and more packages are parsed. The solution to ensure that this works correctly regardless of the verbosity level is simply add a blank line after the output of 'opkg info' is written to the status file, ensuring that the next package is separated from the current package. [YOCTO #6816] Signed-off-by: Paul Barker <paul@paulbarker.me.uk> Cc: Chris Carr <chris.carr@ge.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-04multilib.bbclass/package_manager.py: fix <multilib>-meta-toolchain build failureHongxu Jia
There is a failure to build lib32-meta-toolchain: ... |ERROR: lib32-packagegroup-core-standalone-sdk-target not found in the base feeds (qemux86_64 x86 noarch any all). ... In package_manager.py, the variable 'DEFAULTTUNE_virtclass-multilib-lib32' is used to process multilib image/toolchain. But for the build of lib32- meta-toolchain, the value of 'DEFAULTTUNE_virtclass-multilib-lib32' is deleted. In 'bitbake lib32-meta-toolchain -e', we got: ... |# $DEFAULTTUNE_virtclass-multilib-lib32 [2 operations] |# set? /home/jiahongxu/yocto/build-20141010-yocto/conf/local.conf:237 |# "x86" |# del data_smart.py:406 [finalize] |# "" |# pre-expansion value: |# "None" ... The commit 899d45b90061eb3cf3e71029072eee42cd80930c in oe-core deleted it at DataSmart.finalize ... Author: Richard Purdie <richard.purdie@linuxfoundation.org> Date: Tue May 31 23:52:50 2011 +0100 bitbake/data_smart: Change overrides behaviour to remove expanded variables from the datastore ... We add an internal variable 'DEFAULTTUNE_ML_<multilib>', assign it with the value of 'DEFAULTTUNE_virtclass-multilib-lib32' before deleting. For rpm backend in package_manager.py, we use DEFAULTTUNE_virtclass-multilib -lib32 first, if it is not available, and try to use DEFAULTTUNE_ML_<multilib> [YOCTO #6842] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-10-30image.py: Fix error in graph sortingPascal Bach
The graph sorting algorithm for image dependencies does a look for an occurrence of a searched string instead of comparing the chunk to the searched string. This leads to the problem that ubifs is recognized as ubi aswell. This fixes this by splitting up the string into chunks. Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-24python-smartpm: Add checking for "rpm-ignoresize" optionChong Lu
The do_rootfs takes a very long time when build host has mounted many NFS devices. syscall lstat() was being called on every filesystem mounted on the build host during building. The reason for the lstat() is that rpm is verifying that enough free disk space is available to do the install. However, since the install is into the target rootfs it should not matter how much free space there is in the host mounts. Add checking for "rpm-ignoresize", by it, smart can make whether RPM skip checking for diskspace when install a rpm package. Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-10-10sdk.py: fix write target sdk manifest failed based on ipkHongxu Jia
bitbake meta-toolchain ls tmp/deploy/sdk/poky-glibc-x86_64-meta-toolchain-i586-toolchain-1.7.manifest -al ... |-rw-rw-r-- 1 root root 0 Oct 10 15:05 tmp/deploy/sdk/poky-glibc-x86_64- meta-toolchain-i586-toolchain-1.7.manifest ... The manifest is empty, the reason is target's ipk config path is d.getVar('IPKGCONF_TARGET') rather than d.getVar('IPKGCONF_Target') Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-02oeqa/dmesg: Whitelist usbhid failuresRichard Purdie
We fixed these in parselog but not here. This test really can just be deleted now really. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-02oeqa/parselogs: Ignore qemu usbhid errorsRichard Purdie
These are harmless from the USB pointer device we install, ignore them. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-30deb_packaging: Added support for multilibAnibal Limon
The Package Manager implementation for deb didn't take a look about multilib enabled variants. Changes are made for generate apt.conf, sources.list and debian repo index Release and Packages files. [YOCTO #1502] Signed-off-by: Anibal Limon <anibal.ezau.limon.belmares@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-29rootfs.py: catch inner warn messageHongxu Jia
Package managements (smart/apt-get/opkg-cl) generate some warn messages to stdout, and we need to catch them and output by bb.warn. Here is an example, while invoking smart to attempt install doc packages, if install failed, it generates warn message to stdout. ... |warning: Can't install util-linux-doc-2.24.2-r1@i586: Can't install util-linux-doc-2.24.2-r1@i586: no package provides info ... The fix catches it and outputs: ... |WARNING: log_check: There is a warn message in the logfile |WARNING: log_check: Matched keyword: [warn] |WARNING: log_check: warning: Can't install util-linux-doc-2.24.2-r1@ i586: Can't install util-linux-doc-2.24.2-r1@i586: no package provides info ... Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2014-09-29oeqa/utils: Added filter to LogResults decorator to enforce custom log level.Lucian Musat
Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>