aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2015-04-02package_manager: call createrepo with --dbpath pointing inside WORKDIREd Bartosh
Rpm database in staging area is used only by createrepo. createrepo fails with the error "rpmdb: BDB0060 PANIC: fatal region error detected" if rpm database is broken during previous run of createrepo. Made createrepo to create rpm db in $WORKDIR/rpmdb/ from scratch for every build and architecture. This should potentially fix the failure as every run of createrepo will be using separate db. [YOCTO #6571] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-24package_deb: DpkgIndexer use apt-ftparchive that needs a valid configAndreas Oberritter
Since we have support of log checking in deb/ipk [1] rootfs generation in non Debian-based hosts fails because apt-ftparchive generates a Warning when not find /etc/apt/apt.conf.d/ (available in Debian-based hosts). package_manager.py: DpkgPMIndexer add support for generate and export apt configuration. [1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=86aec93902af2e2d7d73ca9a643707fcca45055c Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-24rootfs.py: Also uninstall update-alternatives and shadow for read-only-rootfsAndreas Oberritter
This brings back commit d41097a970e9bfa553cd4bc3c9fad4b9073d7bd5, which got lost during transition from image.bbclass to rootfs.py. Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-22lib/oe/lsb.py: Prioritize parsing of /etc/os-releaseEd Bartosh
Moved parsing of /etc/os-release before parsing of /etc/SuSE-release as /etc/SuSE-release is deprecated in recent releases of OpenSuSE. Here is the quote from /etc/SuSE-release: /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-22rootfs.py: add log checking ability for deb and ipkChen Qi
Extract the common codes of log checking and add the ability of log checking for deb and ipk package backend. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-22rootfs.py: two changes regarding log checkingChen Qi
This patch involves two changes. 1. Extend the regular expression to also catch '^WARNING:' in _log_check_warn. Warnings from bb.note or bbnote begin with 'WARNING:'. So if we decide to catch warnings at rootfs time, we should not ignore those produced by the build system itself. 2. Delay _log_check in rootfs process so that more warnings are likely to be catched. Note that we should at least delay the _log_check after the execution of ROOTFS_POSTPROCESS_COMMANDS, because we want to catch warnings there. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-21oeqa/runtime: Added a new auto rpm testLucian Musat
The test tries to query the rpm list with a non-root user Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-21oe-selftest: use spaces to indent python code, not tabsPaul Eggleton
Indenting-only change. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-20package_manager: Create variable for install_dir_nameSaul Wold
This patch creates a variable for the install_dir name so it can be something other than /install, also by doing this we can correctly clean up the empty directories (/install/tmp) during the clean-up phase. The new default is /oe_install so as to not conflict with other possible packages that might use /install to place files. [YOCTO #7353] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20lib/oeqa/selftest/lic-checksum: Add INHIBIT_DEFAULT_DEPSRandy Witt
The test_nonmatching_checksum doesn't need the default dependencies, and they would just take extra time to generate. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20lib/oeqa/selftest/lic-checksum: Rename test_fooRandy Witt
test_foo is renamed to test_nonmatching_checksum. It was a mistake to submit it with the old name. There was also some extra whitespace removed. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20oe-selftest: add missing dependency to test_recipetool_create_gitPaul Eggleton
libmatchbox links to libjpeg if it is present so just explicitly build it and then check it appears in DEPENDS. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20oe-selftest: add a test for devtool modify on recipes fetching local filesPaul Eggleton
With the change to externalsrc we can now handle these, so add a test to ensure they can be built. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20oe-selftest: add a test for devtool deploy-targetPaul Eggleton
Whilst this test would seemingly be better placed as a runtime test, unfortunately the runtime tests run under bitbake and you can't run devtool within bitbake (since devtool needs to run bitbake itself). Additionally we are testing build-time functionality as well, so really this has to be done as an oe-selftest test. This test does have a few perhaps unusual requirements in order to run: * pexpect is installed * MACHINE is set to one of the qemu machines * runqemu tap devices have been set up Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20oe-selftest: support getting unexported variable valuesPaul Eggleton
Allow get_bb_var() to work with unexported variable values such as MACHINE - the workaround is a little crude but should suffice for now. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20devtool: modify/extract: prevent usage with incompatible recipesPaul Eggleton
Consolidate code for checking compatible recipes and consider meta and packagegroup recipes as well as package-index and gcc-source to be incompatible. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20devtool: reset: add ability to reset entire workspacePaul Eggleton
Add a -a/--all option to allow you to quickly reset all recipes in your workspace. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20meta/lib/oe/package.py: fix files ownership in packagesFabrice Coulon
This fix solves the problem with the ownership of files in packages. The do_install task was producing correct and expected output but when the files were being put in, e.g. a rpm package, the ownership could be different than that in the do_install task. [YOCTO #7428] Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Fabrice Coulon <fabrice.coulon@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20oeqa/runtime: Fixed a problem in logparser where it failed to whitelist some ↵Lucian Musat
common errors. And some minor tweaks like moving some errors from qemu to common. Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-20oe-selftest: improve bitbake-layers testsPaul Eggleton
* Add a test for add-layer and remove-layer * Correct message for test_bitbakelayers_showoverlayed() * Improve test_bitbakelayers_flatten() to use a more unique name for the temp output directory and clean it up using track_for_cleanup() Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-16rootfs.py: fix logic error so that warnings are checkedChen Qi
The following commit caused log checking for warnings not working for RPM rootfs. rootfs.py: ignore "NOTE:" when catching warnings The problem is that checking for warnings is always skipped because the following statement is always true. if 'log_check' or 'NOTE:' in line: This patch fixes the above problem so that warning checking in RPM rootfs can work again. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-16lib/oeqa/runtime/systemd: Add a basic runtime test for the journalRandy Witt
The test_systemd_journal() test will fail if journalctl exits with a non-zero exit status. The exit status is non-zero even if there are no journal files, which is what drove the creation of this test. [Yocto #7388] Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-12oeqa/parselogs: Skip hda opcode errorsRichard Purdie
These occur when running images under virtualisation on machines with high load which sometimes trigger timeouts in the kernel DMA code. They're harmless to ignore in these cases. Adding this since "failing" the build due to this is more annoying thank useful. [YOCTO #7387] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-09oeqa/selftest: Added a testcase to verify INCOMPATIBLE_LICENSE option.Lucian Musat
Fixes bug 6933 Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-09lib/oeqa/selftest/lic-checksum: Verify failure when checksum changes.Randy Witt
The test added verifies that when a file with an absolute path in LIC_FILES_CHKSUM changes without a corresponding change to the md5sum, it triggers the license qa test again with a failure. [Yocto #6450] Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-03-09meta/lib/oe/utils.py: properly implement both_contain()Cristian Iorga
oe.utils.both_contain() just does a find() on the value rather than splitting the value and then looking in the list of split items. The result is that if you add a feature to MACHINE_FEATURES that itself has a substring that matches one of the values looked for when building COMBINED_FEATURES, you end up with an incomprehensible error (here with "ext2i" in MACHINE_FEATURES): ERROR: Nothing RPROVIDES 'packagegroup-base-ext2' (but /home/balister/src/oe-core/oe-core/meta/recipes-core/ /packagegroups/packagegroup-base.bb RDEPENDS on or otherwise requires it) Fix [YOCTO #6888]. Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-26lib/oe/terminal: fix konsole terminal support for KDE 4.xPaul Eggleton
It seems that the --nofork option genuinely stops konsole from going into the background now; I'm not sure when this changed but it does seem to be working so we can use it. (Tested with Konsole 2.10 and 2.14.2). Fixes [YOCTO #4934]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-26lib/oe/terminal: fix regressionsPaul Eggleton
Fix up some issues introduced by OE-Core commit 818c94f5b9882c2028ef9f056714a0a3c9045551: * If we want to support versions with more than two parts, versions with only one part, or versions with non-integer parts, then we have to stay with strings. We can use distutils.version.LooseVersion() to help with comparisons. * We don't want a warning when launching gnome-terminal 3.10+ and logger.warn() doesn't take a first integer parameter anyway (logger.debug() does). * Also clean up tabs. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-24terminal.py: No --disable-factory for gnome-terminal >= 3.10Sven Ebenfeld
--disable-factory has been disabled in earlier versions of gnome-terminal but from version 3.10 it raises an error and quits. This makes devshell unusable with gnome-terminal >= 3.10. This patch checks for the version and removes --disable-factory if you have the terminal version 3.10 or higher. Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23copy_buildsystem.py: Add methods to copy shared state.Randy Witt
Added the helper functions necessary to copy the sstate from the current build, and generate the file to "lock" it. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23copy_buildsystem.py: Add a way to copy buildsystem to a directory.Randy Witt
This file provides a way to take bitbake and the layers in the current build and copy them to a target specified. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23sstatesig: Add ability to filter list of tasks for locked-sigs.incPaul Eggleton
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23devtool: fix broken clones of git recipesPaul Eggleton
Because we move the workdir when extracting source, then move the source and delete the temporary workdir, you lose the indirection symlink pointed to by the alternates file (which is created when the fetcher clones it from DL_DIR with -s) and the resulting repository is broken. In any case, for a source repo that the user may put their own changes into, we can't really rely on a clone made with -s in case the original goes away - because of cleanall, DL_DIR disappearing, etc. So repack the repository so that it is a complete, non-shared clone after unpacking. (While I'm at it, add a test for devtool modify with a git recipe which verifies that this works.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23devtool: update-recipe: add handling for git recipesPaul Eggleton
When updating git-based recipes, in a lot of cases what you want is to push the changes to the repository and update SRCREV rather than to apply patches within the recipe. Updating SRCREV is now the default behaviour for recipes that fetch from git, but this can be overridden in both directions using a new -m/--mode option. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23lib/oe/recipeutils: minor improvements to patch_recipe()Paul Eggleton
* Ensure it knows where to put SRCREV and S * Handle prepend/append and functions in general Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23devtool: build: run do_populate_sysroot instead of do_installPaul Eggleton
If you want to be able to make use of libraries in conjunction with devtool then we need to install them into the sysroot for other recipes to use. Make it a configuration option in case it needs to be changed at runtime. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23devtool: reset: run bitbake -c clean on recipePaul Eggleton
If you've added a new recipe, you want the output cleaned when you do devtool reset, otherwise cruft from building the recipe may remain which could interfere with future builds. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-23lib/oe/patch: fix PATCHTOOL = "git" with source in a subdirectoryPaul Eggleton
For recipes that have their actual source in a subdirectory of what is fetched (e.g. mkelfimage), we need to find the root of the repository within the GitApplyTree code that attempts to set up the required git hooks and use that, rather than expecting the root to be the same as ${S}. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-21machine/qemu: Switch from ext3 to ext4Richard Purdie
There is no good reason not to use ext4 at this point, it has advantages and few drawbacks. Therefore switch the qemu machines over (and the default runqemu script options). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-21lib/oeqa/selftest/bblayers: use dashed subcommandsPaul Eggleton
bitbake-layers subcommands with underscores are the old syntax; the dashed form has been supported (and displayed in the help text) for quite a while now, and the old syntax is about to be unsupported, so use the dashed form in the tests. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-21lib/oe/package_manager: Performance tweak in regex usageRichard Purdie
Profiling a core-image-sato-sdk rootfs, we're spending over 40s compiling the same regex over and over again, roughly around 5 million times. This is suboptimal, fix for a 40s improvement on a 18.5minute task execution time. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-21oeqa/parselogs: Add exception for new mips error messageRichard Purdie
The 3.19 kernel introduces this error, ignore it for now. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-19oeqa/ptest: Fixed complementary package install detection and added ↵Lucian Musat
ptest-runner exit code check Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17package_manager.py: use 'purge' instead of 'remove' in case of debChen Qi
We need to use 'purge' instead of 'remove' for debian package backend when removing packages at rootfs time. This is because that 'remove' command for 'dpkg' and 'apt-get' does not remove configuration files. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-17lib/oe/package_manager: support exclusion from complementary glob process by ↵Paul Eggleton
regex Sometimes you do not want certain packages to be installed when installing complementary packages, e.g. when using dev-pkgs in IMAGE_FEATURES you may not want to install all packages from a particular multilib. This introduces a new PACKAGE_EXCLUDE_COMPLEMENTARY variable to allow specifying regexes to match packages to exclude. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-15oeqa/ptest: Removed buildhistory as requirement for ptestLucian Musat
Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-14oeqa/smart: Added some new test casesLucian Musat
Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-14oe-pkgdata-util: add some QA testsPaul Eggleton
Test each of the subcommands that this utility provides. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-02-14oe-pkgdata-util: improve command-line usagePaul Eggleton
* Use argparse instead of optparse for standardised help output, options and a much cleaner code structure * Look up pkgdata directory automatically so the user doesn't have to specify it * Use standard logging NOTE: this does mean a slight change in syntax - if you do want to specify the pkgdata directory (usually only necessary if you're calling it from within the build process) you need to use the parameter -p (or --pkgdata-dir) and specify this before the command, not after it. Examples: oe-pkgdata-util find-path /sbin/mke2fs oe-pkgdata-util lookup-recipe libelf1 oe-pkgdata-util read-value PKGSIZE libc6 oe-pkgdata-util -p /home/user/oe/build/tmp/sysroots/qemux86-64/pkgdata read-value PKGSIZE libc6 Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-02-14lib/oe/lsb.py: Fix up for dashSaul Wold
Remove the leading -e when using dash which does not use -e with echo Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>