summaryrefslogtreecommitdiffstats
path: root/meta/lib
Commit message (Collapse)AuthorAgeFilesLines
* package_manager.py: Explicit complementary failNiko Mauno2018-04-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running bitbake -c populate_sdk <image_name>, it is expected that packages matching SDKIMAGE_INSTALL_COMPLEMENTARY name mask (unless declared in PACKAGE_EXCLUDE_COMPLEMENTARY) are installed to resulting SDK. Underlying mechanism issues a package manager install call for set of complementary packages. However the mechanism doesn't seem to inform the user all too obviously in case the package manager command behind install_complementary() method fails -- and since it is combined with attempt_only=True option, user might end up wondering why several *-dev, *-dbg packages are missing from resulting SDK. Improve associated install() method behaviour in affected OpkgPM and DpkgPM classes so that a problematic state of affairs becomes directly obvious for bitbake user, resulting in shell output like: WARNING: someimage-1.0-r0 do_populate_sdk: Unable to install packages. Command '...' returned 1: Collected errors: * Solver encountered 1 problem(s): * Problem 1/1: * - package somepkg-dev-1.0-r0.x86 requires somepkg = 1.0-r0, but none of the providers can be installed * * Solution 1: * - allow deinstallation of someotherpkg-1.1-r1.x86 * - do not ask to install a package providing somepkg-dev * Solution 2: * - do not ask to install a package providing somepkg-dev (From OE-Core rev: 2502bd591c37bf532d02dc6b37fc1e8b5224fb0a) (From OE-Core rev: 88bbc4b84ce97f82d08c841edf25e6fc29d408b0) Signed-off-by: Niko Mauno <niko.mauno@vaisala.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0d4459e7086fced5e9e0b4ad10378c9eddec56a8) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk: streamline locale removalRoss Burton2018-04-021-1/+1
| | | | | | | | | | | For some reason dnf is aborting with the fairly useless "failed to read RPMDB" error during SDK creation. Luckily as we're just deleting locale packages we can pass False to remove() to use RPM directly, which doesn't crash. (From OE-Core rev: cb118806841e585ec6ca820360329ae7d122c0af) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package-manager: add install_glob()Ross Burton2018-04-021-0/+23
| | | | | | | | | (From OE-Core rev: 8d1b530c82de386d4183f5673c060b9d416a3835) (From OE-Core rev: b9a7821086b5165fda9f1c8a7c79a7997803f2a6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: improve install_complementaryRoss Burton2018-04-021-2/+2
| | | | | | | | | | | | - No need to use bb.utils.which() as subprocess will search $PATH - Clarity flow by moving the install inside the try/except (From OE-Core rev: f4d22b7195dd8f08fe26dd353c7e860208e87d6a) (From OE-Core rev: 1267df89164d7dcbbf77668ac49452bd0df87b54) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk: generate locale archive and remove packagesRoss Burton2018-04-021-2/+54
| | | | | | | | | (From OE-Core rev: c6f1010a47df33b40320aa5784181b659a3254d7) (From OE-Core rev: 5256809c570e618171bcb643bef3e2a36d4440bb) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk: only install locales if we're using glibcRoss Burton2018-04-021-0/+4
| | | | | | | | | | | Using glibc-locale to install locales only makes sense if we're using glibc. (From OE-Core rev: 8fc80734053645fa893694dfe33ddaee99aa9a1a) (From OE-Core rev: 14269b953c1f74d7dd72c65df5e925d9ae4e75be) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sdk: install specified locales into SDKRoss Burton2018-04-021-0/+16
| | | | | | | | | (From OE-Core rev: 9b1c3dbe79f67d3b46e0f90a73bce6c61f094a50) (From OE-Core rev: 13ad745bf40a5e3e08a4e1f3295353b395eec43d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/buildcpio: Use our own mirror for sourceRichard Purdie2018-03-041-2/+1
| | | | | | | | | | | | | | We see occasional network glitches which break this test. Use our own mirror (which has a .gz instead of .bz2) to avoid the errors, we're not trying to test network connectivity. (From OE-Core rev: 01df65be2ae4bc337e10babeb9c2394d71ddff84) (From OE-Core rev: b37a049327626ffc6413e53a2d23c55cf18af7f4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner: Simplify binary data handlingRichard Purdie2018-03-041-12/+8
| | | | | | | | | | | | | | | | | | | | I have concerns that bad timing of the flow of data from the logger might corrupt the output due to the way binary strings are handled in qemurunner. This simplifies the code to do the same thing it did before but much more safely. (From OE-Core rev: 20bc247316ab915465a4b1add6d09b48e07202ac) (From OE-Core rev: 84f801e44f4b5ba65489a3a418e5f699abccd003) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1e87283e92a2765bb5d54d17138b208bc395953b) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Clean up logger handlingRichard Purdie2018-03-046-41/+26
| | | | | | | | | | | | | | | | | | | | | | | | The logger handling in oeqa was confused at best. This patch: a) Passes in a logger through various qemu runner pieces b) Uses that logger consistently in the code c) Creates a logger for QemuRunner outside the bitbake namespace meaning we don't conflict with the tinfoil logging changes The result of this is more consistency. For runtime tests in testimage, the logs always contain the debug info, nothing is shwon on the console. For the oe-selftests, logs are intercepted and only shown if the test fails. (From OE-Core rev: ba8babc45141891d0624f9a181a580fa416e87ec) (From OE-Core rev: 22003f97ff7f53c32999dc466d26c1471ead9b6b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/targetcontrol: Drop unused get_target_controller functionRichard Purdie2018-03-041-27/+2
| | | | | | | | | | | | | | This funciton appears completely unused, drop it. (From OE-Core rev: 31ccc70c4ea58e3781ea14eb534e00e9e06e131a) (From OE-Core rev: 31b8991de32ce91af58eab183f283adcded737c2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/qemurunner: Use logger.debug, not logger.infoRichard Purdie2018-03-041-37/+37
| | | | | | | | | | | | | | | | | Bitbake logs info messages to the console. These messages are really there as debugging information. At the debug level, they will be shown in failure logs and in the task logs but not on the console which is what we want in this case. (From OE-Core rev: 5c1cdd4f3ea59a202fff853e0390b9aa5859dc74) (From OE-Core rev: 7274a9caa39c77128ecaf398437e685923ebc2c5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner: Ensure logging handler is removedRichard Purdie2018-03-041-1/+3
| | | | | | | | | | | | | | | If we don't remove the handler we end up with duplicate log messages which is undesireable. (From OE-Core rev: 39e6194615b139e2b772084641940fffa2c9380f) (From OE-Core rev: 074b510c8720e82e5f5978e2824d2168f7f11139) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sshcontrol.py: in copy_to() always use scpErik Botö2018-03-041-6/+3
| | | | | | | | | | | | | | | | | | | | The current implementation is broken when the localpath is a link. Then only a symlink would be created on the target, instead of copying the actual file. [YOCTO #11524] (From OE-Core rev: a9d446d9c42a67109ae87a156ae43dcbb0f56e1e) (From OE-Core rev: fc0cdeca1b9820e070175a0b8d9fefa40eaed15d) Signed-off-by: Erik Botö <erik.boto@pelagicore.com> Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner: fix bad indentation in serial loginRoss Burton2018-03-041-3/+3
| | | | | | | | | | | | (cherry picked from commit c4f57aed7a29000067c63a2821fddf18a88a23ce) (From OE-Core rev: 2de7ffd9f0656ffd5b6fa002213e5f619480aba8) (From OE-Core rev: 1f15fb106f791fe0e7136578ca6f5501324eb826) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner: print tail qemu log in case bootlog is emptyLeonardo Sandoval2018-03-041-1/+6
| | | | | | | | | | | | | | | | | | There are cases where the 'while loop' waiting for login prompt fails and the bootlog variable does not get populated, thus use the the new qemurunner member (self.msg) which stores all output coming from the qemu process. [YOCTO #12113] (From OE-Core rev: 39ffa0f3779305c5e8ef86fe4572e961c5912021) (From OE-Core rev: 40f9f0358184660f23ac7b5fc3e477e2c54e21bc) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner.py: wait for PID to appear in procfsJuro Bystricky2018-03-041-3/+4
| | | | | | | | | | | | | | | | We need QEMU PID in order to access "/proc/<qemupid>/cmdline" Having a valid QEMU PID does not mean we can access the proc entry immediately, we need to wait for the /proc/<qemupid> to appear before we can access it. (From OE-Core rev: d2d069fa9910d1c7a94c898355a63fca03ec5ad8) (From OE-Core rev: bf05abc7931a9a9e0823b24c6f4df4f93913da82) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner.py: refactor searching for QEMU PIDJuro Bystricky2018-03-041-167/+136
| | | | | | | | | | | | | | | | | Ask QEMU to store the QEMU process PID in a file, this way we don't have to parse running processes and analyze descendents. This is done via QEMU command line argument "-pidfile". [YOCTO #12001] (From OE-Core rev: 67612dcd2a8a1aa1d683dddb0bd2f592886ff020) (From OE-Core rev: 9fe7aa1824666d3f7ceb085bef59026e245cb752) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/qemurunner: Improve loggingRichard Purdie2018-03-041-45/+45
| | | | | | | | | | | | | | | | | | | Python unittest intercepts stdout and stderr however qemurunner sets up a streamhandler before that interception occurs, hence the messages spam the unittest output. By moving the logging init to the class init time, we use the unittest stdout/stderr and this means unittest can only show the log output upon failure. This cleans up the selftest and testimage output whilst still showing logging upon failure. (From OE-Core rev: 9099cecc727fe0ae5f1559582426d30ba7a9f4d3) (From OE-Core rev: ee13216284c4d49b762eaab488f21de573d2079d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner: Tweak qemu pid starting timeout codeRichard Purdie2018-03-041-4/+8
| | | | | | | | | | | | | | | We're seeing timeouts in the autobuilder testing code. Increase these timeouts to 120, print the length of time we're having to wait, change the error messages to really be errors and don't print empty logs, its not helpful, print a message about the empty log instead. (From OE-Core rev: b87a33d9c86cc1d2ea196259020e1d3dc712ccef) (From OE-Core rev: 4234ea8aae52347e49f848292deb0936ffd905ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager/sdk: Ensure do_populate_sdk_ext and do_populate_sdk ↵Richard Purdie2018-01-222-5/+13
| | | | | | | | | | repos don't conflict (From OE-Core rev: c9c0927bb6e71253cbdd5b6b780dca829526e1d8) (From OE-Core rev: a18942b0b3b848ccfa4bc50c56a565c279da9d74) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: do not cause kernel rebuildsPatrick Ohly2018-01-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding or removing archiver.bbclass from a build configuration causes rebuilds of linux-yocto-based kernels because of the do_kernel_configme->do_unpack_and_patch task dependency. This particular dependency can be ignored for the do_kernel_configme sstate signature calculcation. Idea for the fix from Richard Purdie. Note that building the kernel and adding archiver.bbclass later to archive sources leads to do_unpack_and_patch running after do_kernel_configme (because that already ran in the first build), which might be problematic. This is independent of the change here. The use case in YOCTO #11441 is to removed archiver.bbclass between a production build with archiving enabled and builds via oe-selftests without archiving. That direction is fine. Fixes: YOCTO #11441 (From OE-Core rev: fed0ed82928e6a7846fbad233ac657bd17bcefc7) (From OE-Core rev: 201c634946d07c8d0ab6d486e5031b4479eb6707) (From OE-Core rev: 81a6623592c3c496b16f0dc2c0ad04c16b0baf29) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/terminal.py: use an absolute path to execute oe-gnome-terminal-phonehomeMing Liu2017-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | A flaw was found on my Ubuntu 14.04.5 LTS, on which that gnome-terminal is the default terminal, when I run any of the tasks: bitbake busybox -c menuconfig/devshell/devpyshell bitbake virtual/kernel -c menuconfig/devshell/devpyshell I got a error as follows: "Failed to execute child process "oe-gnome-terminal-phonehome" (No such file or directory)" Seems the environment of the process calling Popen is not passed to the child process, this behaviour is a known issue in Python bug tracker: http://bugs.python.org/issue8557 It could be fixed by using an absolute path instead per test. (From OE-Core rev: 6dcafdc6754f9eda22dfe93609401d75e8626c05) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 2117c148ef07d84bc605768e3b3671b0126b9337) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: Replace buildiptables for buildlzip testsJose Perez Carranza2017-11-051-4/+4
| | | | | | | | | | | | | | | | | | | Buildiptables test cases are conflicting with images built with “musl” as standard C library, in order to avoid those issues lzip package was selected to be used on the tests as this does not have any "musl" dependency. [YOCTO #11713] (From OE-Core rev: b798284f62b3cb171373716b1ee84403439314aa) (From OE-Core rev: 0699de9efe40029a6c5e799bb8c9616337fd163e) Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime: Replace buildiptables for buildlzip on runtime testsJose Perez Carranza2017-11-051-3/+3
| | | | | | | | | | | | | | | | | | | | | Buildiptables test cases are conflicting with images built with “musl” as standard C library, in order to avoid those issues lzip package was selected to be used on the tests as this does not have any "musl" dependency. This patch is applicable for testimage tests [YOCTO # 11713] (From OE-Core rev: 41683e0ab316049e28b1f4ceaf39f0fe17722d92) (From OE-Core rev: d40bcafb574788ed26855c5d1a072523893c1b4b) Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/archiver: only execute deploy_archives taskAndré Draszik2017-11-051-1/+1
| | | | | | | | | | | | | | | | | There should be no reason to execute a full build, as we're just interested in the deployment of the archives. The newly added tests already do the same. (From OE-Core rev: 89a00238c45b0457bdf7add3629124901bc72f4b) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 78c2897dff7cd9fe2cab511549cb146d5231e573) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/archiver: add tests for recipe type filteringAndré Draszik2017-11-051-0/+76
| | | | | | | | | | | | | | | | | | | | The archiver used to be able to filter based on COPYLEFT_RECIPE_TYPES. Unfortunately, this got broken with the fix for https://bugzilla.yoctoproject.org/show_bug.cgi?id=6929 in commit ae9102bda398 ("copyleft_filter.bbclass: Allow to filter on name") Add two tests to prevent that from happening again. (From OE-Core rev: 11064f15d7fc10b99eac4084af48a91d8b212932) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 709f02c5cb25983090251c6237bac4fc0a295c4f) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool: use stable tarball for recipetool create testRoss Burton2017-11-051-6/+6
| | | | | | | | | | | | | | | GitHub dynamically generates the /archive/ tarballs but we're encoding checksums in the test suite. Change the URL to use a static tarball, and update the checksums. (From OE-Core rev: 9c668f9ff989a34e615e2ecc051dadbfe24a5bb4) (From OE-Core rev: 20f54eb2b2a306858f330eb50205e594d53767ec) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* terminal.py: fix devshell with mate-terminalAndre McCurdy2017-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Without the --disable-factory option, mate-terminal fails to start with the error: | There was an error creating the child process for this terminal | Failed to execute child process "oe-gnome-terminal-phonehome" (No such file or directory) The --disable-factory option was removed by: http://git.openembedded.org/openembedded-core/commit/?id=e8dca725ed8211a874472300a3ed50e494039ab9 apparently based on an assuption that mate-terminal continues to track gnome-terminal since forking from it. However, based on the mate-terminal man page in the upstream master branch, the option is still supported: https://github.com/mate-desktop/mate-terminal (From OE-Core rev: c7f769bd400756d180abf80dbfdf4ed2703fab60) (From OE-Core rev: 764159600a202d1f0c2f0217c7bf7b55348a2f5d) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* terminal.py: avoid 100% cpu while waiting for phonehome pid fileAndre McCurdy2017-09-111-1/+2
| | | | | | | | | | | | | | | Some of the less common terminal types haven't been tested with the recent phonehome pid file changes and there may be error cases where the pid file is never created. (From OE-Core rev: 6b0cf568e9fbe28fb6e7b17f4ad92348d33e2bf4) (From OE-Core rev: 9aa06b3116c095a512be1d1f5da84ffaedf845dc) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* terminal: wait for terminal task to finish before proceddingLeonardo Sandoval2017-09-111-28/+30
| | | | | | | | | | | | | | | | | | | | This commit generalizes the work done in [1] and [2], both fixing issues on several areas (the former with -c patch and gnome-terminal and the latter with -c menuconfig and several terminals, including gnome-terminal and tmux). The main idea is to get the PID from the new spawned terminal and loop there until finished. [1] 76e8ab47c9: terminal: Fix gnome-terminal to work with recent versions [2] 7d02ea283b: cml1.bbclass: wait until menuconfig terminal finishes (From OE-Core rev: 55707401d5bfb1f7686c273fc2d0db89df206395) (From OE-Core rev: 3987dddff58410f1b2535ceb1f48aebbbd987889) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Restore functionality to detect RPM dependenciesPeter Kjellerstedt2017-08-311-18/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the transition to dnf and rpm4, the functionality to automatically make RPM determine dependencies was lost. Before the transition, an OE specific tool called rpmdeps-oecore had been added to the rpm suit. It was based on the rpmdeps tool that is part of rpm. For each file specified on its command line, it would output the provides and requires that RPM could determine. During the transition to rpm4, rpmdeps-oecore was replaced with the standard rpmdeps. However, what no one noticed was that unless rpmdeps is given options, e.g., -P or -R, to tell it what it should output, it will not output anything. Thus, it would do all the work to determine the requirements, but would keep silent about it. And since no output from rpmdeps is expected unless there are requirements, there were no warnings indicating that everything was not working as expected. Porting the old rpmdeps-oecore to work with rpm4 is not really possible since it relied on being able to access internals of RPM that are no longer available. However, it turned out that rpmdeps had a debug option, --rpmfcdebug, that would output exactly the information that we need, albeit in a different format and to stderr. To make this usable, rpmdeps has now received a new option, --alldeps, which sends the information we need to stdout. Since enabling this may cause packages to break, it is required that ENABLE_RPM_FILEDEPS_FOR_PYRO is set to "1" to activate it for Pyro. The name of this variable has been chosen as to indicate that it only affects Pyro (since releases before and after Pyro has it enabled by default). (From OE-Core rev: 1009498f23ad319825c00ba60a4693d15aada553) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: Generate correct RPM package names againPeter Kjellerstedt2017-08-311-3/+3
| | | | | | | | | | | | | | | | During the transition to RPM4, the package names returned by RpmPM.list_installed() changed from the expected names of the packages that were installed into the image to some fictitious source RPM names. This restores the original functionality so that the installed-packages.txt files produced by inheriting buildhistory yet again contains a list of the names of the installed packages. (From OE-Core rev: cd982d5b8944fe231c7dd38c9a563d0fc0737b88) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: Fix support for NO_RECOMMENDATONSRichard Röjfors2017-08-291-1/+1
| | | | | | | | | | | | | | | | When support for dnf was introduced the check of the no NO_RECOMMENDATIONS variable got broken. This fixes the issue by compairing to the string "1" rather than the number 1. (From OE-Core rev: 5f9ea84d304a519acb0504516b86f2683a43f9e9) Signed-off-by: Richard Röjfors <richard@puffinpack.se> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 1849ce3bd7c0af055f3e849a6508e746b6a0dca5) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: set dnf's releasever setting from DISTRO_CODENAMEAlexander Kanavin2017-07-271-3/+5
| | | | | | | | | | | | | | | | | | | | So that: 1) dnf does not complain anymore about releasever not being set and then fail for the same reason; 2) it's possible to refer to $releasever in dnf package feed configuration (repo paths in particular) without hardconding the release name (pyro, morty, etc.) (From OE-Core rev: 789e3fc225adbb61f10aaa3bbc3677856f5f0238) (From OE-Core rev: 5a97694767c76f3083e9ffeeaaa19d76ff424c83) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: flush installed_pkgs file before oe-pkgdata-util uses itMartin Jansa2017-07-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * since this commit: commit f5a1013ffa9815f22e13989e2bcb83f966e7ce2c Author: Ross Burton <ross.burton@intel.com> Date: Tue Apr 18 16:19:12 2017 +0100 package_manager: don't race on a file when installing complementary packages the file isn't closed before oe-pkgdata-util uses it and this temporary file might look empty to oe-pkgdata-util, because it wasn't flushed yet. Which resulted in almost empty debugfs tarballs and no locale packages in regular rootfs. * without this change: 124K May 30 07:41 core-image-full-cmdline-raspberrypi3-64-20170530054003-dbg.rootfs.tar.gz * with this change: 173M May 30 07:29 core-image-full-cmdline-raspberrypi3-64-20170530052715-dbg.rootfs.tar.gz (From OE-Core rev: 9b34200048b3d2b477a19b7ddc8d447f873adbb2) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 877d38db08aa7060d16405443cf70539c559fe82) Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: lock down Meson git revision for reliabilityRoss Burton2017-06-051-2/+2
| | | | | | | | | | | | | | | | The test_recipetool_create_github test fetches HEAD of the repository so upstream changes can (and do) break the test. Avoid these problems by passing the rev= argument in the URL to lock the checkout to the same version that is fetched in the github_tarball test. Also pass the commands to runCmd() as a list instead of a string, the semicolon in the URL needs more quotes if the shell is involved and passing a list bypasses the shell entirely. (From OE-Core rev: 5f02b4300fb2ed54270aede54d30317ba757f587) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf: Add COMPONENTS_DIR for ${STAGING_DIR}-componentsPeter Kjellerstedt2017-05-111-1/+1
| | | | | | | | | | The path to where to install and find the sysroot components is used in many places. This warrants it to get its own variable. (From OE-Core rev: 70a84b525470f72339568409daf84845904e4cab) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: Avoid touch sstates when cleaning linux-yocto environmentJose Perez Carranza2017-04-291-1/+1
| | | | | | | | | | | | | | | sstates are cleaned when ruining test_devtool_virtual_kernel_modify to have a clean environment but this is affecting eSDK test that are dependent of those sstates, hence “cleansstate” is replaced for “clean”. [YOCTO #11300] (From OE-Core rev: 182fdb97ed6c11c7b55fdb99773da6f72c9828b3) Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/bbtests: improve download rename testRoss Burton2017-04-291-3/+4
| | | | | | | | | | | This test was assuming the format of SRC_URI so broke when SRC_URI was changed. Fix the test by hardcoding a complete SRC_URI instead of appending and hoping for the best. (From OE-Core rev: afe1d3073a435ef6c838cc676748842af4c4af83) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: add search, replace strings to export2jsonbrian avery2017-04-201-2/+4
| | | | | | | | | | | | | | | We want to be able to save relative paths so that we can relocate the deploy dir images and kernels, yet still have qemu and testimage work correctly. This extends export2json with 2 named arguments so a search/replace operation can be done to remove the leading path. [YOCTO #11375] (From OE-Core rev: 4829f1ebd89dc91860cf72fbbdc7b6bb0d5822bc) Signed-off-by: brian avery <brian.avery@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: Reverse rpm arch orderJussi Kukkonen2017-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The architecture list used by dnf/libsolv was in the wrong order. As a result, the images were built with wrong and unpredictable packages. $ MACHINE=intel-corei7-64 bitbake core-image-sato $ MACHINE=qemux86-64 bitbake core-image-sato $ MACHINE=intel-corei7-64 bitbake -ccleansstate core-image-sato $ MACHINE=intel-corei7-64 bitbake core-image-sato The first image had 0 core2_64 packages in it, but the last one had 583 core2_64 packages (which were built for the qemu image in between). Reverse the arch order in etc/dnf/vars/arch. Fixes [YOCTO #11384]. (From OE-Core rev: 4a82433de42943f8219beca3286f40b67157172f) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: don't race on a file when installing complementary packagesRoss Burton2017-04-191-25/+22
| | | | | | | | | | | | | | | | | | PackageManager.install_complementary() uses WORKDIR/installed_pkgs.txt as a temporary file but if two tasks are executing for the same recipe which uses this file (e.g. bitbake my-image my-image:do_populate_sdk) then it's possible for the file to be overwritten or deleted. Instead of using a static filename, use tempfile to generate a unique name and ensure it is cleaned up when finished. Also move the glob generation/expansion earlier in the function as if there are no globs to install, we don't need to generate a package list. (From OE-Core rev: f5a1013ffa9815f22e13989e2bcb83f966e7ce2c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: Generate separate repo entries per archIan.Arkver2017-04-141-4/+11
| | | | | | | | | | | | | | dnf requires a serparate repo for each architecture. This patch writes one config file per PACKAGE_FEED_URIS entry with an entry for each architecture, if any. It also uses a space separated version of the repo id as the repo name instead of just the id again. (From OE-Core rev: 3eed822b5c5661aa9f43af6582c1481bacf0d39a) Signed-off-by: Ian.Arkver <ian.arkver.dev@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/runner: Append PID in the test result folder nameLeonardo Sandoval2017-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was found a case (see the bugzilla entry) where two runners were running at the same second, creating identical test result folders, so one of them (the second runner) was not able to create the folder because the other has already created it, raising the following exception (many text was removed from log) NOTE: Executing RunQueue Tasks NOTE: Running task 1 of 2 (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/recipes-core/images/core-image-minimal.bb:do_testsdkext) NOTE: Running task 2 of 2 (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/recipes-sato/images/core-image-sato.bb:do_testsdkext) NOTE: recipe core-image-sato-1.0-r0: task do_testsdkext: Started NOTE: recipe core-image-minimal-1.0-r0: task do_testsdkext: Started . . The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:do_testsdkext(d) 0003: File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/classes/testsdk.bbclass', lineno: 188, function: do_testsdkext 0184: 0185:testsdkext_main[vardepsexclude] =+ "BB_ORIGENV" 0186: 0187:python do_testsdkext() { *** 0188: testsdkext_main(d) 0189:} 0190:addtask testsdkext 0191:do_testsdkext[nostamp] = "1" 0192: File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/classes/testsdk.bbclass', lineno: 171, function: testsdkext_main 0167: except Exception as e: 0168: import traceback 0169: bb.fatal("Loading tests failed:\n%s" % traceback.format_exc()) 0170: *** 0171: result = tc.runTests() . . File: '/usr/lib64/python3.5/os.py', lineno: 241, function: makedirs 0237: cdir = bytes(curdir, 'ASCII') 0238: if tail == cdir: # xxx/newdir/. exists if xxx/newdir exists 0239: return 0240: try: *** 0241: mkdir(name, mode) 0242: except OSError: 0243: # Cannot rely on checking for EEXIST, since the operating system 0244: # could give priority to other errors like EACCES or EROFS 0245: if not exist_ok or not path.isdir(name): Exception: FileExistsError: [Errno 17] File exists: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/build/TestResults_20170409130114' [YOCTO #11318] (From OE-Core rev: 10aa09d39c1b70ce2a88f59601f1f8dbc96ed817) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: Add a name for the generated dnf repo.Ian.Arkver2017-04-121-1/+1
| | | | | | | | | | | This adds repo_name as the name, which is the same as the repo ID and hence a bit pointless, but it stops dnf from complaining that the repo doesn't have a configured name. (From OE-Core rev: c92cff23893e87cfb7ef9f77b16761310104543a) Signed-off-by: Ian.Arkver <ian.arkver.dev@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/wic.py: vda -> sdaRobert Yang2017-04-121-3/+3
| | | | | | | | | | | | Previously, runqemu grep root=/dev/sd or root=/dev/hd on the image, and would use vda if no grep result, now we have set QB_DRIVE_TYPE to "/dev/sd" by default, and the device will be /dev/sda, so use sda to replace vda in the test case. (From OE-Core rev: a722016df3f452f7a870157a99a1abb7d97d8280) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: test wic sparse_copy APIEd Bartosh2017-04-121-0/+29
| | | | | | | | | | | | | Added new parameter 'api' to sparse_copy function to specify underlying filemap API to use. By default sparse_copy will try both available APIs. Added test case for sparse_copy to wic test suite. (From OE-Core rev: 88701cef6ba399e82f96ed1b0eef9a44ed8c1687) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/cases/buildcpio: enable use of cached cpio from DL_DIRJoshua Lock2017-04-111-1/+1
| | | | | | | | | | | | | | All build project test cases will try to copy the requested source artefacts from DL_DIR before fetching. This testcase is referencing bzipped tarball whereas the recipe fetches a gzipped tarball. Switch to fetching the gzipped tarball in the test case so that we're able to use a cached tarball from DL_DIR (From OE-Core rev: 27a5883e8ae01e69f5425efe8b035bea7087b2f9) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory-diff: add option to compare actual signature differencesPaul Eggleton2017-04-111-16/+76
| | | | | | | | | | | | | | | Use the code underpinning bitbake-diffsigs to add an option to buildhistory-diff to determine and display the differences between the actual signature inputs, with a twist - we collapse identical changes across different tasks, showing only the most recent task to have that difference, meaning that there's less noise to wade through when you just want to know what changed in order to cause some rebuilding you're seeing. (From OE-Core rev: 86cb4b01f2020553902554e512c02147eb4e0f51) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>