aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2014-03-11oeqa/utils/qemurunner: search for login string in the entire boot logStefan Stanacar
If some service is to spammy we might miss the login, so search in the entire log instead of just the last few lines. Use qemu in regex too (to avoid a login string from some service). Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-11oeqa/targetcontrol: fix loading a controller using a class nameStefan Stanacar
This was wrong and if one would do TEST_TARGET = "SimpleRemoteTarget" instead of TEST_TARGET = "simpleremote" it would complain that there is no such controller when there is. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-11oeqa/targetcontrol: allow a custom port for SimpleRemoteTargetStefan Stanacar
We had the ability to use a custom port for the ssh connection, but we weren't using it. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-11oeqa/utils/qemurunner: use the right kill call so we don't send SIGTERM to ↵Stefan Stanacar
bitbake-worker After recent bitbake-worker changes [1] this was killing the bitbake-worker, which isn't what we want and kill(-pid) was the wrong call anyway. runqemu.pid is the right PGID as the process was started with preexec_fn=setpgrp (so no need to do os.getpgid(self.runqemu.pid)) [1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=15688798520896690561824b2fdc227c8a365c82 Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-07do_rootfs: Added PACKAGE_FEED_URIS functionalityDavid Nyström
Adding a common interface to add predefined package manager channels to prebuilt rootfs:es. Adding PACKAGE_FEED_URIS = "http://myre.po/repo/, will assume repo directories named (rpm,ipk,deb) as subdirectories and statically add them to the rootfs, using the same PKG_ARCHs as the build which produced the images. Tested with RPM, IPK and DEB. deb feed functionality seem broken, is anyone using this ? Signed-off-by: David Nyström <david.c.nystrom@gmail.com> Signed-off-by: David Nyström <david.nystrom@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-03-07package.py: use subprocess.Popen for rpmdeps callMartin Jansa
* I've noticed errors like this in log.do_package: DEBUG: Executing python function package_do_filedeps sh: 1: Syntax error: "(" unexpected sh: 1: Syntax error: "(" unexpected DEBUG: Python function package_do_filedeps finished which are actually caused by some filenames included in package containing '()' characters Maybe we should change meta/classes/package.bbclass to fail when some filedeprunner call fails like this and fix filedeprunner to escape '()' and other possibly dangerous chars it's called like this: processed = list(pool.imap(oe.package.filedeprunner, pkglist)) * don't use shell=True * show the command when it fails and let do_package task to fail Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-03-07package_manager.py: make list_installed() list pkg dependencies tooLaurentiu Palcu
list_installed("deps") will now return the package dependencies. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-03-07oe-selftest: force some values in local.conf for _sstatetests_noauto.pyCorneliu Stoicescu
1) Some values should have default values in order for tests like sstate relocation to be relevant - SSTATE_DIR needs to have default value - SSTATE_MIRRORS need to be unset (we need the sstate files to be created) - TMPDIR needs to be in default location 2) Added conf/auto.conf to list of ported files to secondary build directories Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-07oe-selftest: optimize code in _sstatetests_noauto.py moduleCorneliu Stoicescu
1) Some of the checks made when creating new directories are unnecessary beacause the test will fail anyway if os.mkdir() fails, with the appropriate error message. Removing this code. 2) Moved the adding to tracked paths for deletion of temporary build directories and sstate-cache directories to after they are created. This makes more sense and prevents deletion of these directories if they allready exist and may contain useful data. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-07lib/oe: drop custom implementation of oe.path.relativeRoss Burton
As we now require Python 2.7 and os.path.relpath() was added in 2.6 we can now drop the reimplementation in oe.path. oe.path.relative is simple now a wrapper that changes the order of the arguments and it's use discouraged. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-03-07image.py, rootfs.py, package_manager.py: redirect stderr to stdout when ↵Laurentiu Palcu
calling check_output() If a command executed with subprocess.check_output() fails, the subprocess.CalledProcessError.output contains only STDOUT and the user needs to check the log.do_rootfs to see any other details. This commit forwards stderr to stdout so that, in case of failure, the entire error output will be displayed in terminal. [YOCTO #5902] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-03-07Rename PACKAGE_GROUP variable to FEATURE_PACKAGESPaul Eggleton
Since tasks were renamed to packagegroups some time ago, this variable name implies that its usage is necessarily related to them which is not the case. Rename the variable to more closely represent what it does (whilst still providing backwards-compatibility with a warning for PACKAGE_GROUP). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-07core-image-basic / packagegroup-core-basic: rename to *-full-cmdlinePaul Eggleton
This more accurately represents what this image and packagegroup are intended to provide (a more complete command-line environment similar to what you would find on a traditional Linux system), and avoids confusion with the similarly named core-image-base and packagegroup-base. Fixes [YOCTO #2424]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05oe-selftest: add test for image manifest file creationAlexandru Palalau
Signed-off-by: Alexandru Palalau <alexandrux.palalau@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05package_manager.py: RpmPM: don't add smart channel if already addedLaurentiu Palcu
Make sure the channel was not already added, before attempting to add. [YOCTO #5890] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-05Revert "lib/oe/package_manager.py: RpmPM: fix issue with multilib builds"Laurentiu Palcu
Converting a list to a set does not keep the order of the items, as they were added, which might result in the wrong packages being installed in the final image... This reverts commit 12f47c23df8c109676f66d580d666a3147f3b046. [YOCTO #5890] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-02oeqa/runtime/dmesg: Ignore DMA timeout errorsRichard Purdie
We see these from qemu images on servers under load. They're not interesting and clutter the build output so lets ignore them. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-28oe-selftest: Fix test_sstate_cache_management_script*Corneliu Stoicescu
Fixed tests for sstate-cache-management.sh that ware failing due to: - recent changes to sstate-cache structure - recent changes to the script itself Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-28oeqa/targetcontrol: make BaseTarget an abstract classStefan Stanacar
This should make it clear what methods a subclass needs to redefine. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-02-28oe-selftest: Fix for test_rm_old_imageCorneliu Stoicescu
After recent changes in poky this test was not working as it should. This commit fixes and improves the test logic. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-02-25oeqa/targetcontrol: properly get the host ipStefan Stanacar
For the SimpleRemote target where we need the host ip and it wasn't set in conf, we tried to determine it automatically. However ip route output isn't the same for every network, we need the last field from the first line. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-25package_manager.py: create index files for all backends in PACKAGE_CLASSESLaurentiu Palcu
The previous implementation was checking IMAGE_PKGTYPE and created the index files just for the backend used to create the image. Apparently, 'bitbake package-index' should attempt to create the index files for all backends specified in PACKAGE_CLASSES. [YOCTO #5827] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-25package_manager.py: correctly handle empty opkg-query-helper.py outputJonathan Liu
If the output from opkg-query-helper.py is empty, output.split('\n') would result in a list containing one element which is an empty string while iterating over each line in the output. An exception is then thrown by the line: pkg, pkg_file, pkg_arch = line.split() with the message: Exception: ValueError: need more than 0 values to unpack To avoid this, we add a condition to only split the output if it isn't empty. 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>
2014-02-24lib/oe/rootfs: Fix LDCONFIGDEPEND checkRichard Purdie
We shouldn't be running this if it expands to None or "" or False so update the code accordingly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-21manifest.py: remove redundant import lineHongxu Jia
The import oe.package_manager line is redundant, let's remove it. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2014-02-21rootfs.py: tweak _multilib_sanity_test for ipk incremental image generationHongxu Jia
The _multilib_sanity_test installs multilib packages in a temporary root fs, and compare with the current image to figure out duplicated files that come from different packages. While incremental image generation enabled and the previous image was existed, there was an Multilib check error: ... ERROR: Multilib check error: duplicate files tmp/work/qemux86_64-poky- linux/core-image-minimal/1.0-r0/multilib/lib32/lib/libc.so.6 tmp/work/ qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/lib/libc.so.6 is not the same ... The reason is the file in the existing image has been prelinked by previous image generation and the file in a temporary root fs is not prelinked, even though both of them came from the same package, the Multilib check failed. [YOCTO #1894] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2014-02-21rootfs.py: support BAD_RECOMMENDATIONS for ipk incremental image generationHongxu Jia
While incremental image generation enabled and the previous image is existed, if BAD_RECOMMENDATIONS is changed, the operation on the existing image is complicated, so remove the old image in this situation. The same with PACKAGE_EXCLUDE and NO_RECOMMENDATIONS. [YOCTO #1894] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2014-02-21rootfs.py: support ipk incremental image generationHongxu Jia
The incremental image generation is based on the previous existing image, adds new packages, upgrades existing packages, and removes unused packages. [YOCTO #1894] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2014-02-21package_manager.py: support ipk incremental image generationHongxu Jia
Add the following three functions to OpkgPM class: - The 'dummy_install' is used to dummy install pkgs, and returns the log of output; - The 'backup_packaging_data' is used to back up the current opkg database; - The 'recover_packaging_data' is used to recover the opkg database which backed up by the previous image creation; Tweak 'remove' function in OpkgPM class, which the options for remove with dependencies was incorrect. Tweak 'handle_bad_recommendations' function in OpkgPM class: - Fix none value check; - Add the existance check of opkg status file; [YOCTO #1894] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2014-02-21manifest.py: add create_full for OpkgManifest classHongxu Jia
The function create_full creates the manifest after the package in initial manifest has been dummy installed. It lists all *to be installed* packages. There is no real installation, just a test. [YOCTO #1894] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2014-02-20package_manager.py: Fix $i -> %s in bb.noteMartin Jansa
* change the text a bit, because I have trouble parsing two verbs at the beginning of sentence. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-02-20package_manager.py: fix installed package list creation for Opkg/DpkgLaurentiu Palcu
Small error in the package list creation routine. Buildhistory was supposed to use this but was never called. Hence, it escaped tests... Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-02-20lib/oe/image.py: add image dependency mechanismLaurentiu Palcu
This commit adds a dependency mechanism to image creation, so that we can split the images creation execution in groups, that can be executed in parallel, having the dependencies satisfied in the same time. The old code didn't need this since everything was serialized. Technically, it adds a dependency graph topological sort class that the main Image class can use to sort out the dependencies. Images that have dependencies have to declare them using the NEW IMAGE_TYPEDEP variable, like in the example below: For: IMAGE_FSTYPES = "i1 i2 i3 i4 i5" IMAGE_TYPEDEP_i4 = "i2" IMAGE_TYPEDEP_i5 = "i6 i4" IMAGE_TYPEDEP_i6 = "i7" IMAGE_TYPEDEP_i7 = "i2" We'll get the following image groups, sorted out by their dependencies: [['i1', 'i3', 'i2'], ['i4', 'i7'], ['i6'], ['i5']] The algorithm can probably be optimized but, given the small size of the graphs, it'll do. [YOCTO #5830] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-02-18rootfs.py: Check for LDCONFIGDEPEND being empty stringKhem Raj
We override LDCONFIGDEPEND to be empty string for uclibc however the current check is for it being None as a result the function is still executed but ldconfig-native is not built as dependency for rootfs when building with uclibc Fixes errors like below File: '/home/kraj/work/angstrom-repo/sources/openembedded-core/meta/lib/oe/rootfs.py', lineno: 191, function: _run_ldconfig 0187: def _run_ldconfig(self): 0188: if self.d.getVar('LDCONFIGDEPEND', True) is not None: 0189: bb.note("Executing: ldconfig -r" + self.image_rootfs + "-c new -v") 0190: self._exec_shell_cmd(['ldconfig', '-r', self.image_rootfs, '-c', *** 0191: 'new', '-v']) Signed-off-by: Khem Raj <raj.khem@gmail.com>
2014-02-18Revert "lib/oe/image.py: fix working directory"Richard Purdie
This reverts commit 3f49597225a58965124503ca5f3cc4011b04b3c0. This change appears to cause more problems than it fixes since the compression commands usually work in the deploy dir but the archive ones have always worked in the rootfs dir (which is clear from the tar command we use).
2014-02-17lib/oe/image.py: fix working directoryJonathan Liu
The working directory needs to be changed before the image creation commands instead of afterwards. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-16lib/oe/package_manager: Make empty package directories non-fatalRichard Purdie
Its perfectly reasonable to call -c package-index with empty package directories. This ensures the builds don't fail in such cases, resolving autobuilder failures. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-14package_manager.py: move multilib prefix list computation function to RpmIndexerLaurentiu Palcu
Since the code from anonymous function in rootfs_rpm.bbclass has been removed, MULTILIB_PREFIX_LIST variable was never set. Hence not all directories got indexed. This commit will move the multilib prefix list computation function from RpmPM class to RpmIndexer, since the indexer needs it too. I was hoping to avoid this but, unfortunately, I couldn't. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-14image_types: sum.jffs2 is replaced by jffs2.sumDmitry Eremin-Solenikov
Previous commit added support for sum 'compression' (rather postprocessing) of jffs2 images. Drop support for sum.jffs2 image type. Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-14package_manager.py, rootfs.py, sdk.py: add Indexer classLaurentiu Palcu
Because the package-index.bb needs to create package indexes outside do_rootfs environment, move the indexing capability out of PackageManager class to a smaller Indexer class. This commit: * simply moves the indexing functions for ipk/deb with no changes; * rewrites the RPM indexing function so that it can be easily moved out of the PackageManager class; * removes some RPM duplicate code, moves it into a method inside RpmPM class and changes the RpmPM constructor so that the new method is effective; Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-13lib/oe/rootfs.py: fix RPM multilib issueLaurentiu Palcu
For some odd reason (at least I couldn't find an explanation to this, yet), if a multilib version of a package is installed after the main one (that is: in a different smart session), the main package binaries are not overwritten. This commit restores the functionality to the original one, before migrating to python: feed all the packages to smart, apart from attempt only ones which are installed separately. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-13(image|rootfs_ipk).bbclass, rootfs.py: ipk multilib fixesLaurentiu Palcu
This commit whitelists some common directories, so the multilib sanity checks pass and also fixes an issue in lib/oe/rootfs.py when the compared files do not exist. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-12oeqa/runtime: smart: don't run in auto mode when rpm is not the pmStefan Stanacar
TEST_SUITES = "auto" would run smart tests even for non-rpm images, which is pointless. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11oeqa/utils: targetbuild: take proxy into accountStefan Stanacar
A previous commit broke downloads when proxies are involved, let's fix it. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11image.py, package_manager.py, rootfs.py: dump command output on errorLaurentiu Palcu
Print the entire command output in case of errors. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2014-02-11lib/oe/package_manager.py: RpmPM: fix issue with multilib buildsLaurentiu Palcu
Use python sets instead of lists, to avoid duplicates. When doing a multilib build, "smart channel --add" fails because it tries to add 'all' channel twice. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2014-02-11lib/oe/package_manager.py: check that package list is not emptyLaurentiu Palcu
If we're just attempting to install packages and the package list is empty, just return. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2014-02-11rootfs.py, package_manager.py, sdk.py: Fix building from feeds feature for opkgLaurentiu Palcu
When using opkg as the PM backend, one has the option to provide custom feeds to create the rootfs from. This commit: * fixes this in the refactored code; * moves the custom config creation code to python; * clean up the package-ipk.bbclass; Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2014-02-11lib/oe/package_manager.py: OpkgPM, bad recommendation handling changeLaurentiu Palcu
The following commit: rootfs_ipk: Ensure that BAD_RECOMMENDATIONS are honoured for all architectures changed the way BAD_RECOMMENDATIONS are handled. Make the change in the new code too. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2014-02-11lib/oe/package_manager.py: do not use stampsLaurentiu Palcu
Using stamps shortens rootfs/image creation because the package indexes are not created again if no new package was installed in the deploy dir. Unfortunately, there are some syncronization issues with do_package_write_*() and the indexes are not properly created. Will have to revisit this issue in the near future. For now, lose it. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>